Fixes 500 when set returning function returns an empty row set [fix #332]

This commit is contained in:
Diogo Biazus
2015-10-27 21:19:55 -04:00
parent bd1826670e
commit 4369a5617e
3 changed files with 13 additions and 2 deletions
+5
View File
@@ -310,6 +310,11 @@ spec =
post "/rpc/getitemrange" [json| { "min": 2, "max": 4 } |] `shouldRespondWith`
[json| [ {"id": 3}, {"id":4} ] |]
context "a proc that returns an empty rowset" $
it "returns empty json array" $
post "/rpc/test_empty_rowset" [json| {} |] `shouldRespondWith`
[json| [] |]
context "a proc that returns plain text" $
it "returns proper json" $
post "/rpc/sayhello" [json| { "name": "world" } |] `shouldRespondWith`