@Jason Wang the consumer side of a pact spec checks 2 things. 1, that the consumer code sends the expected request and 2. That it does the right thing with the response.
Beth (pactflow.io/Pact Broker/pact-ruby)
04/07/2022, 9:48 PM
Eg does it parse the body correctly and return a domain object. Should it raise an exception if it gets a 500. Should it return null for a 404.
Beth (pactflow.io/Pact Broker/pact-ruby)
04/07/2022, 9:49 PM
To check these, you should use your normal testing framework expectations.
Beth (pactflow.io/Pact Broker/pact-ruby)
04/07/2022, 9:49 PM
It's just like a normal unit test for the client.
j
Jason Wang
04/07/2022, 10:00 PM
I see, that makes sense. Thanks @Beth (pactflow.io/Pact Broker/pact-ruby)