Allow using nulls order without explicit order direction, fix #552

This commit is contained in:
SteveBash
2016-10-04 16:11:19 -05:00
parent 9b7685e5d1
commit 50ae48295d
5 changed files with 19 additions and 6 deletions
+11
View File
@@ -333,6 +333,17 @@ spec = do
, matchHeaders = ["Content-Range" <:> "0-1/*"]
}
it "by a column with nulls first" $
get "/no_pk?order=a.nullsfirst"
`shouldRespondWith` ResponseMatcher {
matchBody = Just [json| [{"a":null,"b":null},
{"a":"1","b":"0"},
{"a":"2","b":"0"}
] |]
, matchStatus = 200
, matchHeaders = ["Content-Range" <:> "0-2/*"]
}
it "by a column asc with nulls last" $
get "/no_pk?order=a.asc.nullslast"
`shouldRespondWith` ResponseMatcher {