fix: no empty tx on Not Found error
This commit is contained in:
committed by
Steve Chavez
parent
28183a667c
commit
6d7bf9faa9
@@ -11,10 +11,6 @@ import Protolude
|
||||
spec :: SpecWith ((), Application)
|
||||
spec =
|
||||
describe "Disabled OpenApi" $ do
|
||||
it "does not accept application/openapi+json and responds with 415" $
|
||||
it "responds with 404" $
|
||||
request methodGet "/"
|
||||
[("Accept","application/openapi+json")] "" `shouldRespondWith` 415
|
||||
|
||||
it "accepts application/json and responds with 404" $
|
||||
request methodGet "/"
|
||||
[("Accept","application/json")] "" `shouldRespondWith` 404
|
||||
[("Accept","application/openapi+json")] "" `shouldRespondWith` 404
|
||||
|
||||
@@ -18,6 +18,13 @@ spec = do
|
||||
it "gives 404 when requesting a nonexistent table in this nonexistent schema" $
|
||||
get "/nonexistent_table" `shouldRespondWith` 404
|
||||
|
||||
describe "Non existent URL" $ do
|
||||
it "gives 404 on a single nested route" $
|
||||
get "/projects/nested" `shouldRespondWith` 404
|
||||
|
||||
it "gives 404 on a double nested route" $
|
||||
get "/projects/nested/double" `shouldRespondWith` 404
|
||||
|
||||
describe "Unsupported HTTP methods" $ do
|
||||
it "should return 405 for CONNECT method" $
|
||||
request methodConnect "/"
|
||||
|
||||
Reference in New Issue
Block a user