Export list cleanup
This commit is contained in:
parent
db53252960
commit
9f97de6519
@ -22,49 +22,68 @@ backend pre-conditions, or to assert that your session is having the desired eff
|
|||||||
|
|
||||||
-}
|
-}
|
||||||
|
|
||||||
module Yesod.Test (
|
module Yesod.Test
|
||||||
-- * Declaring and running your test suite
|
( -- * Declaring and running your test suite
|
||||||
yesodSpec, YesodSpec, YesodSpecTree (..), ydescribe, yit,
|
yesodSpec
|
||||||
|
, YesodSpec
|
||||||
|
, YesodSpecTree (..)
|
||||||
|
, ydescribe
|
||||||
|
, yit
|
||||||
|
|
||||||
-- * Making requests
|
-- * Making requests
|
||||||
-- | To make a request you need to point to an url and pass in some parameters.
|
-- | To make a request you need to point to an url and pass in some parameters.
|
||||||
--
|
--
|
||||||
-- To build your parameters you will use the RequestBuilder monad that lets you
|
-- To build your parameters you will use the RequestBuilder monad that lets you
|
||||||
-- add values, add files, lookup fields by label and find the current
|
-- add values, add files, lookup fields by label and find the current
|
||||||
-- nonce value and add it to your request too.
|
-- nonce value and add it to your request too.
|
||||||
--
|
--
|
||||||
post, post_, get, get_, doRequest, doRequestHeaders,
|
, post
|
||||||
byName, fileByName,
|
, post_
|
||||||
|
, get
|
||||||
|
, get_
|
||||||
|
, doRequest
|
||||||
|
, doRequestHeaders
|
||||||
|
, byName
|
||||||
|
, fileByName
|
||||||
|
|
||||||
-- | Yesod cat auto generate field ids, so you are never sure what
|
-- | Yesod can auto generate field ids, so you are never sure what
|
||||||
-- the argument name should be for each one of your args when constructing
|
-- the argument name should be for each one of your args when constructing
|
||||||
-- your requests. What you do know is the /label/ of the field.
|
-- your requests. What you do know is the /label/ of the field.
|
||||||
-- These functions let you add parameters to your request based
|
-- These functions let you add parameters to your request based
|
||||||
-- on currently displayed label names.
|
-- on currently displayed label names.
|
||||||
byLabel, fileByLabel,
|
, byLabel
|
||||||
|
, fileByLabel
|
||||||
|
|
||||||
-- | Does the current form have a _nonce? Use any of these to add it to your
|
-- | Does the current form have a _nonce? Use any of these to add it to your
|
||||||
-- request parameters.
|
-- request parameters.
|
||||||
addNonce, addNonce_,
|
, addNonce
|
||||||
|
, addNonce_
|
||||||
|
|
||||||
-- * Assertions
|
-- * Assertions
|
||||||
assertEqual, assertHeader, assertNoHeader, statusIs, bodyEquals, bodyContains,
|
, assertEqual
|
||||||
htmlAllContain, htmlAnyContain, htmlCount,
|
, assertHeader
|
||||||
|
, assertNoHeader
|
||||||
|
, statusIs
|
||||||
|
, bodyEquals
|
||||||
|
, bodyContains
|
||||||
|
, htmlAllContain
|
||||||
|
, htmlAnyContain
|
||||||
|
, htmlCount
|
||||||
|
|
||||||
-- * Grab information
|
-- * Grab information
|
||||||
getTestYesod,
|
, getTestYesod
|
||||||
getResponse,
|
, getResponse
|
||||||
|
|
||||||
-- * Utils for debugging tests
|
-- * Debug output
|
||||||
printBody, printMatches,
|
, printBody
|
||||||
|
, printMatches
|
||||||
|
|
||||||
-- * Utils for building your own assertions
|
-- * Utils for building your own assertions
|
||||||
-- | Please consider generalizing and contributing the assertions you write.
|
-- | Please consider generalizing and contributing the assertions you write.
|
||||||
htmlQuery, parseHTML, withResponse
|
, htmlQuery
|
||||||
|
, parseHTML
|
||||||
)
|
, withResponse
|
||||||
|
) where
|
||||||
where
|
|
||||||
|
|
||||||
import qualified Test.Hspec as Hspec
|
import qualified Test.Hspec as Hspec
|
||||||
import qualified Test.Hspec.Core as Core
|
import qualified Test.Hspec.Core as Core
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user