hydra-node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.API.HTTPServerSpec

Contents

Synopsis

Documentation

spec :: 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.