Specifying Content-Type serializes Matcher object #1107
Labels
awaiting feedback
Awaiting Feedback from OP
documentation
Indicates a need for improvements or additions to documentation
Software versions
Please provide at least OS and version of pact-js
18.16.1
Issue Checklist
Please confirm the following:
Expected behaviour
Testing an api-client for an endpoint that returns a string I create a pact provider that responds with a body and an exact content-type. The matching should only ensure it's a string body, but the content-type header must be exact match:
I expect something like:
Actual behaviour
When providing a content-type header, the actual matcher is serialized to a json-string:
When not providing a content-type header the body is correct but the header is incorrect:
Steps to reproduce
Generated pact-file (stub):
If removing the header in the response the body matching rule is correct but content-type is wrong:
Relevant log files
Please ensure you set logging to
DEBUG
and attach any relevant log files here (or link to a gist).The text was updated successfully, but these errors were encountered: