Wai package:sydtest-wai

Test a Application Example usage:
exampleApplication :: Wai.Application
exampleApplication req sendResp = do
lb <- strictRequestBody req
sendResp $ responseLBS HTTP.ok200 (requestHeaders req) lb

spec :: Spec
spec =
waiClientSpec exampleApplication $
describe "get" $
it "can GET the root and get a 200" $ do
resp <- get "/"
liftIO $ responseStatus resp `shouldBe` ok200
A client environment for a Application with a user-defined environment as well
A Wai testing monad that carries client state, information about how to call the application, a user-defined environment, and everything necessary to show nice error messages.
For compatibility with hspec-wai
For compatibility with hspec-wai
The user-defined environment
A SetupFunc for a WaiClient, given an Application and user-defined env.
Run a given Application around every test. This provides a 'WaiClient ()' which contains the port of the running application.
Run a given Application, as built by the given action, around every test.
Run a given Application, as built by the given SetupFunc, around every test.
Run a given Application, as built by the given SetupFunc, around every test. This function doesn't set up the Manager like waiClientSpecWithSetupFunc does.
The cookies to pass along
The last request and response pair
Run a given Application around every test. This provides the port on which the application is running.
Run a Application around every test by setting it up with the given setup function. This provides the port on which the application is running.
Run a Application around every test by setting it up with the given setup function that can take an argument. a This provides the port on which the application is running.
Run a Application around every test by setting it up with the given SetupFunc. a This provides the port on which the application is running.
Run a Application around every test by setting it up with the given SetupFunc and inner resource. a This provides the port on which the application is running.
A wai companion library for sydtest A wai companion library for sydtest