Pact: Validate That An Array Contains A Matching Hash
I have a service that returns an array of hashes, the order of which is non-deterministic. I need to validate that there exists one hash that has a certain key/value, and that has
Solution 1:
This is not currently possible. You might like to join this conversation about the feature that you are asking for: https://github.com/pact-foundation/pact-specification/issues/38
However, one thing that I will point out is that pact works best when you can control the data on the provider. If you cannot control the data, then pact might not be the best tool for your scenario. Have a read of: https://github.com/pact-foundation/pact-ruby/wiki/Why-Pact-may-not-be-the-best-tool-for-testing-public-APIs
Post a Comment for "Pact: Validate That An Array Contains A Matching Hash"