fix: no empty tx on bad HTTP method

This commit is contained in:
steve-chavez
2022-07-11 18:21:36 -05:00
committed by Steve Chavez
parent 6d7bf9faa9
commit 8230128ff6
8 changed files with 58 additions and 56 deletions
+2 -2
View File
@@ -516,11 +516,11 @@ spec actualPgVersion =
simpleStatus p `shouldBe` internalServerError500
isErrorFormat (simpleBody p) `shouldBe` True
context "unsupported verbs" $ do
context "unsupported method" $ do
it "DELETE fails" $
request methodDelete "/rpc/sayhello" [] ""
`shouldRespondWith`
[json|{"message":"Bad Request","code":"PGRST101","details":null,"hint":null}|]
[json|{"message":"Cannot use the DELETE method on RPC","code":"PGRST101","details":null,"hint":null}|]
{ matchStatus = 405
, matchHeaders = [matchContentTypeJson]
}