sul-dlss / folio_client

Interface for interacting with the Folio ILS API.
Other
0 stars 0 forks source link

FolioClient spec: test TokenWrapper.refresh by mocking http request/response, instead of mocking FolioClient::Inventory calls #26

Closed jmartin-sul closed 1 year ago

jmartin-sul commented 1 year ago

Why was this change made? 🤔

this is a bit more integration-y, and lets us more easily refactor TokenWrapper usage without having to keep the spec so closely synced to the implementation of what's being tested.

connects with https://github.com/sul-dlss/folio_client/issues/24

(will allow refactoring of TokenWrapper.refresh call as asked for by that ticket, without having to further change tests; and since we know the current request code works, this PR shows that the modified test works with the old code, and doesn't just play to the refactor)

How was this change tested? 🤨

spec only change

âš¡ âš  If this change has cross service impact, including data writes to shared file systems, run integration tests and/or test in [stage|qa] environment, in addition to specs. âš¡