feat: Drop support for pg 9.6
This commit is contained in:
committed by
Wolfgang Walther
parent
ec110720dc
commit
daa77d17aa
@@ -7,8 +7,7 @@ import Network.HTTP.Types
|
||||
import Test.Hspec
|
||||
import Test.Hspec.Wai
|
||||
|
||||
import PostgREST.Config.PgVersion (PgVersion, pgVersion100,
|
||||
pgVersion110)
|
||||
import PostgREST.Config.PgVersion (PgVersion, pgVersion110)
|
||||
|
||||
import Protolude
|
||||
import SpecHelper
|
||||
@@ -25,18 +24,17 @@ spec actualPgVersion = describe "Allow header" $ do
|
||||
it "fails with 404 for an unknown table" $
|
||||
request methodOptions "/unknown" [] "" `shouldRespondWith` 404
|
||||
|
||||
when (actualPgVersion >= pgVersion100) $
|
||||
context "a partitioned table" $ do
|
||||
it "includes read/write methods for writeable partitioned tables" $ do
|
||||
r <- request methodOptions "/car_models" [] ""
|
||||
liftIO $
|
||||
simpleHeaders r `shouldSatisfy`
|
||||
matchHeader "Allow" (
|
||||
if actualPgVersion >= pgVersion110 then
|
||||
"OPTIONS,GET,HEAD,POST,PUT,PATCH,DELETE"
|
||||
else
|
||||
"OPTIONS,GET,HEAD,POST,PATCH,DELETE"
|
||||
)
|
||||
context "a partitioned table" $ do
|
||||
it "includes read/write methods for writeable partitioned tables" $ do
|
||||
r <- request methodOptions "/car_models" [] ""
|
||||
liftIO $
|
||||
simpleHeaders r `shouldSatisfy`
|
||||
matchHeader "Allow" (
|
||||
if actualPgVersion >= pgVersion110 then
|
||||
"OPTIONS,GET,HEAD,POST,PUT,PATCH,DELETE"
|
||||
else
|
||||
"OPTIONS,GET,HEAD,POST,PATCH,DELETE"
|
||||
)
|
||||
|
||||
context "a view" $ do
|
||||
context "auto updatable" $ do
|
||||
|
||||
Reference in New Issue
Block a user