Do you have some example or guideline on how to ha...
# documentation
é
Do you have some example or guideline on how to handle a
DELETE
request from both consumer and provider side?
y
Looking across the pact-foundation, there is an example in this project https://github.com/pactflow/example-siren/blob/24fabae041bb454c9c75726ea7cae5cec4b7632c/consumer/src/__tests__/delete-order.spec.js#L95-L102 https://github.com/pactflow/example-siren We recently had a contributor reboot the example and add a couple of others, current WIP https://github.com/pactflow/example-siren/pull/1 might be worth a quick 👀
é
There is nothing in the provider, we want to test the
DELETE
request in an idempotent way, so me need a way to provide the resource id from the consumer or send it back from the provider
y
can you provide a quick sample of the endpoint you are trying to hit? or what you have tried so far, and I can have a nose. just had a look at the project in more detail and there is no provider test code, another one for the list!
m
Do you have some example or guideline on how to handle a
DELETE
request from both consumer and provider side?
why is this any different to to other requests? You would just have a state that says something like “A user with ID 1234” exists for the delete use case, and the provider would ensure that such a user exists before the tests run
1
☝️ 1
é
Am I correct to assume the mock consumer send the request during the
Execute Provider Test
step from the Lifecycle of a provider verification diagram?
m
Yep!
1