Closed philsturgeon closed 9 months ago
What the message is saying is "The spec doesn't have a 200 response defined"... unless you're saying it does?
Either way, I think the message could be improved to say:
The status code provided (200) does not match any defined response objects.
Or something to that effect.
Reading it now it makes sense, but was super confused at the time.
Can we do something like expected vs received?
Expected status code 201, received status code 200.
Or something?
There's a fair few assertions that are Failed to assert that true equals false
and I think language like this is usually more clear.
I'm being told that there's no 200 status code so a test is failing, but it actually is responding with a 200. It's meant to be 201, which is what my test is checking for (my controller was wrong).
So Spectator is detecting the response doesn't match the expectated status code, its just reporting it wrong in the error message.