nhsuk / connecting-to-services

Find a pharmacy
https://www.nhs.uk/service-search/find-a-pharmacy/
MIT License
2 stars 9 forks source link

We are limited in tests around opening times due to the use of 'now' #154

Closed neilbmclaughlin closed 7 years ago

neilbmclaughlin commented 8 years ago

Need to address this by having a mechanism to mock current time.

st3v3nhunt commented 8 years ago

Are there specific examples where this is a problem?

I accept the returned value from isOpen() is going to vary based on now() but this is easily handled by using orgs that are either open all day or closed all day. Here I am specifically talking about the code in app/lib/getPharmacies.js

st3v3nhunt commented 7 years ago

This is possible within the api app and was introduced in nhsuk/nearby-services-api#43 Closing