Closed YOU54F closed 5 years ago
Switched over to the ruby implementation in the following commit
and seeing a server error returned where we send a request without a content-type header and no body, or with a content-type header of application/json but no body.
Feel free to close this issue 👍
No prob.
Issue
NB:- an example repo with this issue is available here https://github.com/YOU54F/pact-consumer-example-typescript
Where a pact provider is setup with the following 2 request matchers
When a request is sent with no body, a duplicate match is found and the first result is returned
Pact stub server logs :-
[WARN] Found more than one pact request for method POST and path '/test', using the first one
Actual Result :- Returns the first matching response (false positive) Expected Result :- Return a 404 and no body, as only a portion of the request was matched (no body)
Reproduction Steps
Versions
Installation
git clone git@github.com:YOU54F/pact-consumer-example-typescript.git
yarn install
yarn build
Run pact tests
yarn run pact-test
Start the mock server
docker-compose up
Run the following request -
Expected Result = Returns an empty response body and a 404 Actual Result = Returns the below body and a 200
Pact stub server logs spit out the following
[WARN] Found more than one pact request for method POST and path '/test', using the first one
#