Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- servantSpec :: forall api. HasServer api '[] => Proxy api -> ServerT api Handler -> ServantSpec -> Spec
- servantSpecWithSetupFunc :: forall api. HasServer api '[] => Proxy api -> SetupFunc (ServerT api Handler) -> ServantSpec -> Spec
- clientEnvSetupFunc :: forall api. HasServer api '[] => Proxy api -> Manager -> ServerT api Handler -> SetupFunc ClientEnv
- servantSpecWithContext :: forall api (ctx :: [Type]). (HasServer api ctx, HasContextEntry (ctx .++ DefaultErrorFormatters) ErrorFormatters) => Proxy api -> Context ctx -> ServerT api Handler -> ServantSpec -> Spec
- servantSpecWithSetupFuncWithContext :: forall api (ctx :: [Type]). (HasServer api ctx, HasContextEntry (ctx .++ DefaultErrorFormatters) ErrorFormatters) => Proxy api -> Context ctx -> SetupFunc (ServerT api Handler) -> ServantSpec -> Spec
- clientEnvSetupFuncWithContext :: forall api (ctx :: [Type]). (HasServer api ctx, HasContextEntry (ctx .++ DefaultErrorFormatters) ErrorFormatters) => Proxy api -> Context ctx -> Manager -> ServerT api Handler -> SetupFunc ClientEnv
- testClient :: ClientEnv -> ClientM a -> IO a
- testClientOrError :: ClientEnv -> ClientM a -> IO (Either ClientError a)
Documentation
servantSpec :: forall api. HasServer api '[] => Proxy api -> ServerT api Handler -> ServantSpec -> Spec Source #
Run a given servant server around every test
servantSpecWithSetupFunc :: forall api. HasServer api '[] => Proxy api -> SetupFunc (ServerT api Handler) -> ServantSpec -> Spec Source #
Run a servant server around every test, based around the given SetupFunc
clientEnvSetupFunc :: forall api. HasServer api '[] => Proxy api -> Manager -> ServerT api Handler -> SetupFunc ClientEnv Source #
servantSpecWithContext :: forall api (ctx :: [Type]). (HasServer api ctx, HasContextEntry (ctx .++ DefaultErrorFormatters) ErrorFormatters) => Proxy api -> Context ctx -> ServerT api Handler -> ServantSpec -> Spec Source #
Like servantSpec
, but allows setting a context. Useful for example when your server uses basic auth.
servantSpecWithSetupFuncWithContext :: forall api (ctx :: [Type]). (HasServer api ctx, HasContextEntry (ctx .++ DefaultErrorFormatters) ErrorFormatters) => Proxy api -> Context ctx -> SetupFunc (ServerT api Handler) -> ServantSpec -> Spec Source #
Like servantSpecWithSetupFunc
, but allows setting a context. Useful for example when your server uses basic auth.
clientEnvSetupFuncWithContext :: forall api (ctx :: [Type]). (HasServer api ctx, HasContextEntry (ctx .++ DefaultErrorFormatters) ErrorFormatters) => Proxy api -> Context ctx -> Manager -> ServerT api Handler -> SetupFunc ClientEnv Source #
testClientOrError :: ClientEnv -> ClientM a -> IO (Either ClientError a) Source #