Closed alestor123 closed 3 years ago
Please see the tests. We already do this.
@RIAEvangelist other than calling the api every time
The only thing you do not want to do is actually pay for the pizza. All the rest of the calls, you do want to really hit the API and validate the real responses. Stubbing the responses would lead to major testing problems if dominos made any endpoint changes.
If you wanted to create your own stubbing service, you could just add that to the URLS object as described in the internationalization docs. This might be worth documenting as well. Like a test Stubbing doc to give an example to testers.
The base example is here docs/InternationalSupport.md
it could easily be used to make a stubbing service too.
But one of the main reasons this could be bad is if dominos does some checks, like if a store is open etc. the subbed response might not consider that and give false passing.
I think we need to find a way to test this api without costing or ordering some thing it would be a huge pain to develop with this api @RIAEvangelist