Add set schema to middleware

Fix #828, breaking change: computed columns now only work if they are on
the config schema.

Fix #835, tests now not depend on the search_path of the
postgrest_test_authenticator.
This commit is contained in:
steve-chavez
2018-01-10 09:50:20 -05:00
committed by Steve Chávez
parent f9e770b583
commit 85d9feeeab
7 changed files with 24 additions and 20 deletions
+3
View File
@@ -171,6 +171,9 @@ spec = do
[json| [{"id":1},{"id":2},{"id":3},{"id":4},{"id":5},{"id":6},{"id":7},{"id":8},{"id":9},{"id":10},{"id":11},{"id":12},{"id":13},{"id":14},{"id":15}] |]
{ matchHeaders = [matchContentTypeJson] }
it "cannot access a computed column that is outside of the config schema" $
get "/items?always_false=is.false" `shouldRespondWith` 400
it "matches filtering nested items 2" $
get "/clients?select=id,projects{id,tasks2{id,name}}&projects.tasks.name=like.Design*"
`shouldRespondWith` [json| {"message":"Could not find foreign keys between these entities, No relation found between projects and tasks2"}|]