hspec-wai-0.8.0: Experimental Hspec support for testing WAI applications

Safe Haskell | None
Language | Haskell2010

Test.Hspec.Wai.Matcher

# Documentation

data ResponseMatcher Source #

Constructors

ResponseMatcher |

Fields

- matchStatus :: Int
- matchHeaders :: [MatchHeader]
- matchBody :: MatchBody

Instances

Num ResponseMatcher Source # |
Methods (+) :: ResponseMatcher -> ResponseMatcher -> ResponseMatcher # (-) :: ResponseMatcher -> ResponseMatcher -> ResponseMatcher # (*) :: ResponseMatcher -> ResponseMatcher -> ResponseMatcher # negate :: ResponseMatcher -> ResponseMatcher # abs :: ResponseMatcher -> ResponseMatcher # signum :: ResponseMatcher -> ResponseMatcher # fromInteger :: Integer -> ResponseMatcher #
IsString ResponseMatcher Source # |
Methods fromString :: String -> ResponseMatcher #

data MatchHeader Source #

Constructors

MatchHeader ([Header] -> Body -> Maybe String) |

data MatchBody Source #

Constructors

MatchBody ([Header] -> Body -> Maybe String) |

Instances

IsString MatchBody Source # |
Methods fromString :: String -> MatchBody #

type Body = ByteString Source #

(<:>) :: HeaderName -> ByteString -> MatchHeader Source #

bodyEquals :: Body -> MatchBody Source #

match :: SResponse -> ResponseMatcher -> Maybe String Source #