Closed nickshoust-wf closed 7 years ago
I take it there is a difference in behaviour on the actual server when the slash is not included?
Correct. I was expecting a 200 for the request if it had the slash before the query portion but was getting a 404 as there no handler for it.
That server be weird :P I'll have a look in the code and see if the slash is being deliberately dropped anywhere.
Well, look what we have here:
Looks like I've been meaning to get rid of that for a very long time. I remember now. I wanted to release all the breaking changes for version 2 together, but it had never made it to the top of the priority list. Let me have a think about what I can do.
Ok, I've released a new version of the mock service gem (2.0.0, because it was a breaking change). Now you'll need to get the docker image updated.
I have come across an issue when using a query parameter on the pact.with_request()
The issue is when your path has a trailing slash and you are including a query in your request
The resulting contract splits the path and query into separate keys under request but does not include the trailing slash as a part of the path.
I have included a link to a gist of an example test that generates a contract as well as the contract it generated in the comments
https://gist.github.com/nickshoust-wf/5850df10ec556632e8eee467f6819199