Closed erewok closed 6 years ago
@jkarni I think this one's ready, I just need a bit of help thinking through any broader implications (CHANGELOG, etc.).
I have been thinking about this PR and I think I'd like to withdraw it. I have some thoughts that I'd like to explore a bit before coming up with a suggestion for representing predicates based on Request
+ Response
versus predicates based only on a Response
.
I have been thinking about this in light of this comment from the Predicates
module:
-- The idea with all this footwork is to not waste any requests. Rather than
-- generating new requests and only applying one predicate to the response, we
-- apply as many predicates as possible.
While I have some ideas on representing these things, this part is kind of stumping me.
Description
This PR does the following:
Adds the
Request
toResponsePredicate
so thatPredicateFailure
can pretty print the request as well as the failing response.Removes the
Maybe
fromPredicateFailure (Maybe Request)
now that bothRequestFailure
andResponseFailure
require the request.Adds tests for the following predicates:
not500
andunauthorizedContainsWWWAuthenticate
Fixes #14