mirror of
https://github.com/ilyakooo0/servant-quickcheck.git
synced 2024-08-16 22:00:32 +03:00
Add test for onlyJsonObjects when no content-type header is present.
This commit is contained in:
parent
35c98622fc
commit
e3bf044741
@ -133,6 +133,10 @@ onlyJsonObjectSpec = describe "onlyJsonObjects" $ do
|
||||
withServantServerAndContext octetAPI ctx serverOctetAPI $ \burl ->
|
||||
serverSatisfies octetAPI burl args (onlyJsonObjects <%> mempty)
|
||||
|
||||
it "does not fail when there is no content-type" $ do
|
||||
withServantServerAndContext api2 ctx serverFailing $ \burl ->
|
||||
serverSatisfies api2 burl args (onlyJsonObjects <%> mempty)
|
||||
|
||||
notLongerThanSpec :: Spec
|
||||
notLongerThanSpec = describe "notLongerThan" $ do
|
||||
|
||||
@ -274,6 +278,9 @@ server2 = return $ return 1
|
||||
server3 :: IO (Server API2)
|
||||
server3 = return $ return 2
|
||||
|
||||
serverFailing :: IO (Server API2)
|
||||
serverFailing = return . throwError $ err405
|
||||
|
||||
-- With Doctypes
|
||||
type HtmlDoctype = Get '[HTML] Blaze.Html
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user