| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Test.Syd.Yesod.E2E
Synopsis
- yesodE2ESpec :: URI -> YesodSpec (E2E site) -> Spec
- yesodE2ESpec' :: URI -> YesodSpec (E2E site) -> TestDef '[Manager] ()
- localToE2EClient :: YesodClient site -> YesodClient (E2E site)
- localToE2ESpec :: YesodSpec (E2E site) -> YesodSpec site
- data E2E site = E2E
Documentation
yesodE2ESpec :: URI -> YesodSpec (E2E site) -> Spec Source #
Run an end-to-end yesod test suite against a remote server at the given URI.
If you would like to write tests that can be run against both a local and a remote instance of your site, you can use the following type:
mySpec :: (Yesod site, RedirectUrl site (Route App)) => YesodSpec site
mySpec = do
it "responds 200 OK to GET HomeR" $ do
get HomeR
statusIs 200yesodE2ESpec' :: URI -> YesodSpec (E2E site) -> TestDef '[Manager] () Source #
Like yesodE2ESpec, but doesn't set up the Manager for you.
If you are running the end-to-end test against a server that uses
https://, make sure to use a TLS-enabled Manager.
You can do this using beforeAll newTlsManager.
localToE2EClient :: YesodClient site -> YesodClient (E2E site) Source #
Turn a local 'YesodClient site' into a remote 'YesodClient (E2E site)'.
localToE2ESpec :: YesodSpec (E2E site) -> YesodSpec site Source #
See localToE2EClient
Turn an end-to-end yesod test suite into a local yesod test suite by treating a local instance as remote.
A dummy type that is an instance of Yesod, with as a phantom type, the app that it represents.
That is to say, E2E site is an instance of Yesod that pretends to be a
site. You can treat it as a site in end-to-end tests, except that you
cannot use the site value because there is none in there.
Constructors
| E2E |