Further question: what does the `ProviderState` de...
# pact-swift
o
Further question: what does the
ProviderState
describe? If we pass
Copy code
ProviderState(description: "orders exist", params: ["id": "12345"])
what is that supposed to match up with? Does that mean the API is expecting a body with
id
value of "12345"? In the example params are sent to ProviderState for a .GET request, so presumably these are not parameters passed along with a request. Are we just completely off in our assumptions? Thanks in advance 🙂
m
These help provider side set up the state of their side of the test. They are not parameters of a request. Think of “provider state” as a state of environment/data at the time of the request. https://github.com/pact-foundation/pact-specification/tree/version-3#allow-multiple-provider-states-with-parameters
In your particular case the provider would seed their database with an order with id:1234.