-
-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two interactions that only differ by query string #12
Comments
Hi @tshortt, yes that should be possible - uniqueness for a request is calculated as a combination of the attributes in the Could you please provide a Gist to some code? It's more than likely a setup problem. |
Following up on @mefellows answer above, @tshortt could you please also provide the log generated by your test? When the mock server runs it creates a log under |
@tshortt I just realised I didn't have any test related to this case so I'm adding one now. Here's the output I got from my mock server log:
Here's the test added: https://github.com/pact-foundation/pact-js/blob/master/test/dsl/integration.spec.js#L100 |
Here's a gist So lines 34-37, versus lines 77-83 https://gist.github.com/tshortt/e453cf12ea7c3114f0c166dc9e75bdfa#file-gistfile1-js-L34-L37 mockserver-integration.log output in the gist |
hi @tshortt looks like it might be a bug with the pact mock server. I opened a new issue there, let's see what comes back 👍 |
Marking as enhancement, waiting on pact-foundation/pact-mock_service/issues/54. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I've just tested this and your scenario should work as expected. I'm not sure where along the lines this was fixed, but it is :) |
Is it possible to add two different interactions that only differ by query string. Here's an example of what I'm trying to accomplish:
projectsProvider.addInteraction({ uponReceiving: 'a request for employee', withRequest: { method: 'get', path: '/EmployeeApi/api/organizations/0/employees' }
versus
projectsProvider.addInteraction({ uponReceiving: 'a request for employee with emails', withRequest: { method: 'get', path: '/EmployeeApi/api/organizations/0/employees', query: { 'include': 'emails' } }
Error:
Failed: Actual interactions do not match expected interactions for mock MockService.
Missing requests:
GET /EmployeeApi/api/organizations/0/employees?include=emails
The text was updated successfully, but these errors were encountered: