disallow limit/offset on views
This commit is contained in:
committed by
Steve Chavez
parent
73dc2692b1
commit
f3f9030c48
@@ -3,7 +3,7 @@ module Feature.Query.DeleteSpec where
|
||||
import Network.Wai (Application)
|
||||
|
||||
import Network.HTTP.Types
|
||||
import Test.Hspec
|
||||
import Test.Hspec hiding (pendingWith)
|
||||
import Test.Hspec.Wai
|
||||
import Test.Hspec.Wai.JSON
|
||||
|
||||
@@ -213,7 +213,16 @@ spec =
|
||||
`shouldRespondWith` ""
|
||||
{ matchStatus = 204 }
|
||||
|
||||
it "doesn't work with views" $
|
||||
request methodDelete "/limited_delete_items_view?limit=1&offset=1"
|
||||
[("Prefer", "tx=commit")]
|
||||
mempty
|
||||
`shouldRespondWith`
|
||||
[json| {"hint":null,"details":null,"code":"PGRST507","message":"limit/offset is not implemented for views"} |]
|
||||
{ matchStatus = 501 }
|
||||
|
||||
it "works with views with an inferred pk" $ do
|
||||
pendingWith "not implemented yet"
|
||||
get "/limited_delete_items_view"
|
||||
`shouldRespondWith`
|
||||
[json|[
|
||||
|
||||
Reference in New Issue
Block a user