@@ -133,6 +133,10 @@ onlyJsonObjectSpec = describe "onlyJsonObjects" $ do
133 withServantServerAndContext octetAPI ctx serverOctetAPI $ \burl ->
133 withServantServerAndContext octetAPI ctx serverOctetAPI $ \burl ->
134 serverSatisfies octetAPI burl args (onlyJsonObjects <%> mempty)
134 serverSatisfies octetAPI burl args (onlyJsonObjects <%> mempty)
136+ it "does not fail when there is no content-type" $ do
137+ withServantServerAndContext api2 ctx serverFailing $ \burl ->
138+ serverSatisfies api2 burl args (onlyJsonObjects <%> mempty)
136notLongerThanSpec :: Spec
140notLongerThanSpec :: Spec
137notLongerThanSpec = describe "notLongerThan" $ do
141notLongerThanSpec = describe "notLongerThan" $ do
@@ -274,6 +278,9 @@ server2 = return $ return 1
274server3 :: IO (Server API2)
278server3 :: IO (Server API2)
275server3 = return $ return 2
279server3 = return $ return 2
281+serverFailing :: IO (Server API2)
282+serverFailing = return . throwError $ err405
277-- With Doctypes
284-- With Doctypes
278type HtmlDoctype = Get '[HTML] Blaze.Html
285type HtmlDoctype = Get '[HTML] Blaze.Html