| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Web.Scim.Test.Util
Synopsis
- shouldRespondWith :: HasCallStack => WaiSession SResponse -> ResponseMatcher -> WaiExpectation
- shouldEventuallyRespondWith :: HasCallStack => WaiSession SResponse -> ResponseMatcher -> WaiExpectation
- post :: ByteString -> ByteString -> WaiSession SResponse
- put :: ByteString -> ByteString -> WaiSession SResponse
- patch :: ByteString -> ByteString -> WaiSession SResponse
- data AcceptanceConfig tag = AcceptanceConfig {}
- defAcceptanceConfig :: IO Application -> AcceptanceConfig tag
- data AcceptanceQueryConfig tag = AcceptanceQueryConfig {}
- defAcceptanceQueryConfig :: AcceptanceQueryConfig tag
- post' :: AcceptanceQueryConfig tag -> ByteString -> ByteString -> WaiSession SResponse
- put' :: AcceptanceQueryConfig tag -> ByteString -> ByteString -> WaiSession SResponse
- patch' :: AcceptanceQueryConfig tag -> ByteString -> ByteString -> WaiSession SResponse
- get' :: AcceptanceQueryConfig tag -> ByteString -> WaiSession SResponse
- delete' :: AcceptanceQueryConfig tag -> ByteString -> ByteString -> WaiSession 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 SResponse -> ResponseMatcher -> WaiExpectation 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 SResponse -> ResponseMatcher -> WaiExpectation Source #
Making wai requests
post :: ByteString -> ByteString -> WaiSession SResponse Source #
put :: ByteString -> ByteString -> WaiSession SResponse Source #
patch :: ByteString -> ByteString -> WaiSession SResponse Source #
data AcceptanceConfig tag Source #
Constructors
| AcceptanceConfig | |
| Fields 
 | |
defAcceptanceConfig :: IO Application -> AcceptanceConfig tag Source #
data AcceptanceQueryConfig tag Source #
Constructors
| AcceptanceQueryConfig | |
| Fields | |
post' :: AcceptanceQueryConfig tag -> ByteString -> ByteString -> WaiSession SResponse Source #
put' :: AcceptanceQueryConfig tag -> ByteString -> ByteString -> WaiSession SResponse Source #
patch' :: AcceptanceQueryConfig tag -> ByteString -> ByteString -> WaiSession SResponse Source #
get' :: AcceptanceQueryConfig tag -> ByteString -> WaiSession SResponse Source #
delete' :: AcceptanceQueryConfig tag -> ByteString -> ByteString -> WaiSession 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.
Constructors
| Field a | 
Instances
| Functor (Field s) Source # | |
| Eq a => Eq (Field s a) Source # | |
| Ord a => Ord (Field s a) Source # | |
| Read a => Read (Field s a) Source # | |
| Show a => Show (Field s a) Source # | |
| (KnownSymbol s, ToJSON a) => ToJSON (Field s a) Source # | |
| Defined in Web.Scim.Test.Util | |
| (KnownSymbol s, FromJSON a) => FromJSON (Field s a) Source # | |
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 UserId (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 | |