hspec-wai-0.10.1: 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

Instances details

Num ResponseMatcher Source # |

Instance details

Defined in Test.Hspec.Wai.Matcher

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 # |
Instance details Defined in Test.Hspec.Wai.Matcher Methods fromString :: String -> ResponseMatcher

data MatchHeader Source #

Constructors

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

data MatchBody Source #

Constructors

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

#### Instances

Instances details

IsString MatchBody Source # |
Instance details Defined in Test.Hspec.Wai.Matcher Methods fromString :: String -> MatchBody

type Body = ByteString Source #

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

bodyEquals :: Body -> MatchBody Source #

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

formatHeader :: Header -> String Source #