Test insertion of various json types

This commit is contained in:
Joe Nelson
2014-08-27 12:48:41 -07:00
parent 134ca1f2a8
commit d06674a1e8
4 changed files with 48 additions and 18 deletions
+8
View File
@@ -33,6 +33,14 @@ instance JSON.FromJSON IncPK where
spec :: Spec
spec = around appWithFixture $
describe "Posting new record" $ do
it "accepts disparate json types" $
post "/menagerie"
[json| {
"integer": 13, "double": 3.14159, "varchar": "testing!"
, "boolean": false, "date": "01/01/1900", "money": "$3.99"
} |]
`shouldRespondWith` 201
context "with no pk supplied" $ do
context "into a table with auto-incrementing pk" $
it "succeeds with 201 and link" $ do