It can happen that during testing with servant-quickcheck, the server will answer a response with no content-type header (e.g. a 502 or 405 response). The OnlyJsonObjects predicate considered these cases as a failure for itself, which made no sense since the responses hold no content.
This PR aims at fixing that, by first adding a check that verifies this behavior does not happen, and then fixing the predicate. (I also believe the new predicate is clearer to read, but that's opinion).
It can happen that during testing with servant-quickcheck, the server will answer a response with no
content-type
header (e.g. a 502 or 405 response). TheOnlyJsonObjects
predicate considered these cases as a failure for itself, which made no sense since the responses hold no content.This PR aims at fixing that, by first adding a check that verifies this behavior does not happen, and then fixing the predicate. (I also believe the new predicate is clearer to read, but that's opinion).