Safe Haskell | None |
---|
Network.Wai.Test
Contents
- type Session = ReaderT Application (StateT ClientState IO)
- runSession :: Session a -> Application -> IO a
- request :: Request -> Session SResponse
- srequest :: SRequest -> Session SResponse
- data SRequest = SRequest {}
- data SResponse = SResponse {}
- defaultRequest :: Request
- setPath :: Request -> ByteString -> Request
- setRawPathInfo :: Request -> ByteString -> Request
- assertStatus :: Int -> SResponse -> Session ()
- assertContentType :: ByteString -> SResponse -> Session ()
- assertBody :: ByteString -> SResponse -> Session ()
- assertBodyContains :: ByteString -> SResponse -> Session ()
- assertHeader :: CI ByteString -> ByteString -> SResponse -> Session ()
- assertNoHeader :: CI ByteString -> SResponse -> Session ()
Session
type Session = ReaderT Application (StateT ClientState IO)
runSession :: Session a -> Application -> IO a
Requests
setPath :: Request -> ByteString -> Request
Set whole path (request path + query string).
setRawPathInfo :: Request -> ByteString -> Request
Assertions
assertStatus :: Int -> SResponse -> Session ()
assertContentType :: ByteString -> SResponse -> Session ()
assertBody :: ByteString -> SResponse -> Session ()
assertBodyContains :: ByteString -> SResponse -> Session ()
assertHeader :: CI ByteString -> ByteString -> SResponse -> Session ()
assertNoHeader :: CI ByteString -> SResponse -> Session ()