sydtest-servant-0.2.0.2: A servant companion library for sydtest
Safe HaskellNone
LanguageHaskell2010

Test.Syd.Servant

Synopsis

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.

Orphan instances

IsTest (ClientM ()) Source # 
Instance details

Associated Types

type Arg1 (ClientM ()) #

type Arg2 (ClientM ()) #

Methods

runTest :: ClientM () -> TestRunSettings -> ProgressReporter -> ((Arg1 (ClientM ()) -> Arg2 (ClientM ()) -> IO ()) -> IO ()) -> IO TestRunResult #

IsTest (outerArgs -> ClientM ()) Source # 
Instance details

Associated Types

type Arg1 (outerArgs -> ClientM ()) #

type Arg2 (outerArgs -> ClientM ()) #

Methods

runTest :: (outerArgs -> ClientM ()) -> TestRunSettings -> ProgressReporter -> ((Arg1 (outerArgs -> ClientM ()) -> Arg2 (outerArgs -> ClientM ()) -> IO ()) -> IO ()) -> IO TestRunResult #