Lock hasql version for now
This commit is contained in:
+2
-2
@@ -16,7 +16,7 @@ executable dbapi
|
||||
default-extensions: OverloadedStrings
|
||||
other-extensions: QuasiQuotes
|
||||
build-depends: base >=4.6 && <5
|
||||
, hasql >= 0.2.0, hasql-backend, hasql-postgres
|
||||
, hasql >= 0.2.3 && < 0.3.0, hasql-backend, hasql-postgres
|
||||
, warp >= 3.0.2, wai >= 3.0.1
|
||||
, wai-extra, wai-cors
|
||||
, wai-middleware-static >= 0.6.0
|
||||
@@ -58,7 +58,7 @@ Test-Suite spec
|
||||
Other-Modules: App, Auth, Config, Spec, SpecHelper
|
||||
Build-Depends: base, hspec >= 2.0, QuickCheck
|
||||
, hspec-wai >= 0.5.0, hspec-wai-json
|
||||
, hasql >= 0.2.0, hasql-backend, hasql-postgres
|
||||
, hasql >= 0.2.3 && < 0.3.0, hasql-backend, hasql-postgres
|
||||
, warp >= 3.0.2, wai >= 3.0.1
|
||||
, HTTP, convertible
|
||||
, case-insensitive
|
||||
|
||||
@@ -16,17 +16,21 @@ import Control.Monad (replicateM_)
|
||||
|
||||
import TestTypes(IncPK(..), CompoundPK(..))
|
||||
|
||||
--import Debug.Trace
|
||||
|
||||
spec :: Spec
|
||||
spec = before resetDb $ around withApp $ do
|
||||
describe "Posting new record" $ do
|
||||
it "accepts disparate json types" $
|
||||
post "/menagerie"
|
||||
it "accepts disparate json types" $ do
|
||||
p <- post "/menagerie"
|
||||
[json| {
|
||||
"integer": 13, "double": 3.14159, "varchar": "testing!"
|
||||
, "boolean": false, "date": "01/01/1900", "money": "$3.99"
|
||||
, "enum": "foo"
|
||||
} |]
|
||||
`shouldRespondWith` 201
|
||||
liftIO $ do
|
||||
simpleBody p `shouldBe` ""
|
||||
simpleStatus p `shouldBe` created201
|
||||
|
||||
context "with no pk supplied" $ do
|
||||
context "into a table with auto-incrementing pk" $
|
||||
|
||||
Reference in New Issue
Block a user