New to pact, but excited to implement at my current 'micro services' based company I generated some reports that compares JSON responses, all done in ruby.
But I am getting stumped by a few keys that are date based and index based.
Key: - is expected
+ is actual
Matching keys and values are not shown
{
"metadata": {
- "received_at": "2017-10-23T11:50:12Z"
+ "received_at": "2017-10-25T01:26:00Z"
},
"response": {
"cascading_avm_results": {
"automated_valuation": {
- "run_date": "2017-10-23",
- "internal_run_identifier": "1508784611820479",
- "valuation_date": "2017-10-23"
+ "run_date": "2017-10-25",
+ "internal_run_identifier": "1508963160085440",
+ "valuation_date": "2017-10-25"
}
}
}
is there a way to make the provider response ignore it, or modify the output to match those keys?
My understanding, and please correct me if I am wrong, is that we shouldn't stub that provider response on the contract testing right?