You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each interaction is tested in isolation, meaning you can't do a PUT/POST/PATCH, and then follow it with a GET to ensure that the values you sent were actually read successfully by the provider. If you send a lastname instead of a surname field, a provider will most likely ignore the misnamed field, and return a 200, failing to alert you to the fact that your lastname has gone to the big /dev/null in the sky.
The code should warn you when a POST/PUT/PATCH request is defined, with a non-empty body, that does not make any expectations about the response.
The text was updated successfully, but these errors were encountered:
Hi! This makes sense to me, I could probably put together a PR--were you thinking this warning would appear when the interaction is defined in the consumer specs (so probably in pact-mock_service, I guess?), or when it's verified?
The warning would be best when the interaction is defined. We want the person writing the consumer tests to be aware of it before it gets written to the pact. Not sure whether it would be best in the consumer code in the main pact lib (because it's "closer" to the UI/console) or in the mock service (better for reuse). Not sure if the output from the mock service shows up in the console during tests or not - maybe you could look into this and come up with a proposal?
Each interaction is tested in isolation, meaning you can't do a PUT/POST/PATCH, and then follow it with a GET to ensure that the values you sent were actually read successfully by the provider. If you send a lastname instead of a surname field, a provider will most likely ignore the misnamed field, and return a 200, failing to alert you to the fact that your lastname has gone to the big /dev/null in the sky.
The code should warn you when a POST/PUT/PATCH request is defined, with a non-empty body, that does not make any expectations about the response.
The text was updated successfully, but these errors were encountered: