Use "::unknown" type casts to overcome binary protocol restrictions

Fixes #112
This commit is contained in:
Joe Nelson
2014-12-16 20:09:01 -08:00
parent 19b62c00ee
commit 9712549d64
7 changed files with 49 additions and 29 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ spec = before resetDb $ around withApp $ do
p <- post "/menagerie"
[json| {
"integer": 13, "double": 3.14159, "varchar": "testing!"
, "boolean": false, "date": "01/01/1900", "money": "$3.99"
, "boolean": false, "date": "1900-01-01", "money": "$3.99"
, "enum": "foo"
} |]
liftIO $ do
@@ -139,7 +139,7 @@ spec = before resetDb $ around withApp $ do
"id":1,
"nullable_string":"hi",
"non_nullable_string":"bye",
"inserted_at": "now()"
"inserted_at": "2020-11-11"
} |]
`shouldRespondWith` ResponseMatcher {
matchBody = Nothing,
+1 -1
View File
@@ -40,7 +40,7 @@ testSettings :: SessionSettings
testSettings = fromMaybe (error "bad settings") $ H.sessionSettings 1 30
pgSettings :: Postgres
pgSettings = H.Postgres "localhost" 5432 "dbapi_test" "" "dbapi_test"
pgSettings = H.ParamSettings "localhost" 5432 "dbapi_test" "" "dbapi_test"
withApp :: ActionWith Application -> IO ()
withApp perform =