Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- shouldRespondWith :: HasCallStack => WaiSession st SResponse -> ResponseMatcher -> WaiExpectation st
- shouldEventuallyRespondWith :: HasCallStack => WaiSession st SResponse -> ResponseMatcher -> WaiExpectation st
- post :: ByteString -> ByteString -> WaiSession st SResponse
- put :: ByteString -> ByteString -> WaiSession st SResponse
- patch :: ByteString -> ByteString -> WaiSession st SResponse
- data AcceptanceConfig tag = AcceptanceConfig {}
- defAcceptanceConfig :: IO Application -> AcceptanceConfig tag
- data AcceptanceQueryConfig tag = AcceptanceQueryConfig {}
- defAcceptanceQueryConfig :: AcceptanceQueryConfig tag
- post' :: AcceptanceQueryConfig tag -> ByteString -> ByteString -> WaiSession st SResponse
- put' :: AcceptanceQueryConfig tag -> ByteString -> ByteString -> WaiSession st SResponse
- patch' :: AcceptanceQueryConfig tag -> ByteString -> ByteString -> WaiSession st SResponse
- get' :: AcceptanceQueryConfig tag -> ByteString -> WaiSession st SResponse
- delete' :: AcceptanceQueryConfig tag -> ByteString -> ByteString -> WaiSession st SResponse
- (<//>) :: ByteString -> ByteString -> ByteString
- scim :: QuasiQuoter
- newtype Field (s :: Symbol) a = Field a
- getField :: Field s a -> a
- data TestTag id authData authInfo userExtra
Documentation
shouldRespondWith :: HasCallStack => WaiSession st SResponse -> ResponseMatcher -> WaiExpectation st Source #
re-implementation of shouldRespondWith
with better error reporting.
FUTUREWORK: make this a PR upstream. (while we're at it, we can also patch WaiSession
and request
to keep track of the SRequest
, and add that to the error message here with
the response.)
shouldEventuallyRespondWith :: HasCallStack => WaiSession st SResponse -> ResponseMatcher -> WaiExpectation st Source #
Making wai requests
post :: ByteString -> ByteString -> WaiSession st SResponse Source #
put :: ByteString -> ByteString -> WaiSession st SResponse Source #
patch :: ByteString -> ByteString -> WaiSession st SResponse Source #
data AcceptanceConfig tag Source #
AcceptanceConfig | |
|
defAcceptanceConfig :: IO Application -> AcceptanceConfig tag Source #
data AcceptanceQueryConfig tag Source #
post' :: AcceptanceQueryConfig tag -> ByteString -> ByteString -> WaiSession st SResponse Source #
put' :: AcceptanceQueryConfig tag -> ByteString -> ByteString -> WaiSession st SResponse Source #
patch' :: AcceptanceQueryConfig tag -> ByteString -> ByteString -> WaiSession st SResponse Source #
get' :: AcceptanceQueryConfig tag -> ByteString -> WaiSession st SResponse Source #
delete' :: AcceptanceQueryConfig tag -> ByteString -> ByteString -> WaiSession st SResponse Source #
(<//>) :: ByteString -> ByteString -> ByteString Source #
avoid multiple /
. (kill at most one /
at the end of first arg and beginning of
second arg, resp., then add one during concatenation.
>>>
["a" <//> "b", "a" <//> "/b", "a/" <//> "b", "a/" <//> "/b"]
["a/b","a/b","a/b","a/b"]
WARNING: {doctests don't work in our infrastructure](https:/github.comzinfrabackend-issuesissues/1549), so this is duplicated in the unit tests.
Request/response quasiquoter
scim :: QuasiQuoter Source #
A response matcher and quasiquoter that should be used instead of
json
.
JSON parsing
newtype Field (s :: Symbol) a Source #
A way to parse out a single value from a JSON object by specifying the field as a type-level string. Very useful when you don't want to create extra types.
Field a |
Instances
Functor (Field s) Source # | |
(KnownSymbol s, FromJSON a) => FromJSON (Field s a) Source # | |
(KnownSymbol s, ToJSON a) => ToJSON (Field s a) Source # | |
Defined in Web.Scim.Test.Util | |
Read a => Read (Field s a) Source # | |
Show a => Show (Field s a) Source # | |
Eq a => Eq (Field s a) Source # | |
Ord a => Ord (Field s a) Source # | |
Defined in Web.Scim.Test.Util |
Tag
data TestTag id authData authInfo userExtra Source #
A type-level tag for UserTypes
, AuthTypes
, etc. that allows picking any types we
might need in tests.
Instances
AuthTypes (TestTag id authData authInfo userExtra) Source # | |
GroupTypes (TestTag id authData authInfo userExtra) Source # | |
Defined in Web.Scim.Test.Util | |
UserTypes (TestTag id authData authInfo userExtra) Source # | |
type AuthData (TestTag id authData authInfo userExtra) Source # | |
Defined in Web.Scim.Test.Util | |
type AuthInfo (TestTag id authData authInfo userExtra) Source # | |
Defined in Web.Scim.Test.Util | |
type GroupId (TestTag id authData authInfo userExtra) Source # | |
Defined in Web.Scim.Test.Util | |
type UserExtra (TestTag id authData authInfo userExtra) Source # | |
Defined in Web.Scim.Test.Util | |
type UserId (TestTag id authData authInfo userExtra) Source # | |
Defined in Web.Scim.Test.Util |