Body payload rules - JSONError
Opened this issue · 0 comments
eruvanos commented
We do have a pact, that contains some non-JSON body.
{
"consumer": {
"name": "Pot"
},
"provider": {
"name": "Rainbow"
},
"interactions": [
{
"description": "return word",
"providerState": "entry exists",
"request": {
"method": "GET",
"path": "/doc/dc98ea69-d442-abcd-ba6b-5ee0815b1882",
"headers": {
"Accept": "application/msword",
}
},
"response": {
"status": 200,
"headers": {
"content-type": "application/msword"
},
"body": "RE9DVU1FTlRfQ09OVEVOVA=="
}
}
],
"metadata": {
"pactSpecification": {
"version": "2.0.0"
}
}
}
The verify fails with JSON exception from this line.
Regarding the docs-"Body payload rules" the verify should at least compare the two body values.
By the way: Is there a chance to support binary comparison, by giving base64 encoded values?