| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.API.HTTPServerSpec
Contents
Synopsis
- spec :: Spec
- apiServerSpec :: Spec
- matchJSON :: (IsString s, ToJSON a) => a -> s
- matchCBOR :: (Eq a, Show a, FromCBOR a) => a -> MatchBody
- matchValidJSON :: FilePath -> SchemaSelector -> MatchBody
Documentation
apiServerSpec :: Spec Source #
Helpers
matchJSON :: (IsString s, ToJSON a) => a -> s Source #
Create a ResponseMatcher or MatchBody from a JSON serializable value
(using their IsString instances).
matchCBOR :: (Eq a, Show a, FromCBOR a) => a -> MatchBody Source #
Create a MatchBody that CBOR-decodes the response body and compares it
to an expected value.
matchValidJSON :: FilePath -> SchemaSelector -> MatchBody Source #
Create a MatchBody that validates the returned JSON response against a
schema. NOTE: This raises impure exceptions, so only use it in this test
suite.