Bryen
02/16/2023, 4:54 PMgiven we make a request to this endpoint with these query params, we expect this EXACT response
sort of style, right?
Please feel free to correct me if I'm wrong on any of these assumptions, and thanks in advance! 🤗Bryen
02/16/2023, 4:54 PM/user
which takes an email
query parameter, our Pact test should just have a regex to ensure that the email is valid (standard email regex, perhaps a check on the domain for the email, etc.) and then ensure that the response contains the fields we would expect to see for the user
object of the response, using things like `StringMatcher`s to ensure that a username
has no special characters in it, etc. because the Android/iOS apps won't accept that, hence breaking the contract we expect. The Pact shouldn't do things like create a hardcoded case where, for example, the email
query parameter is <mailto:noaddressprovided@email.com|noaddressprovided@email.com>
and willRespondWith
responds with a user
object that has no address field in it, if I've understood correctly?Bryen
02/16/2023, 4:55 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Nathan Deamer
02/27/2023, 2:35 PM