upgrade hspec-wai, get tests passing.
This commit is contained in:
+1
-1
@@ -62,7 +62,7 @@ Test-Suite spec
|
||||
Main-Is: Main.hs
|
||||
Other-Modules: Dbapi, Spec, SpecHelper
|
||||
Build-Depends: base, hspec2
|
||||
, hspec-wai >= 0.4.0
|
||||
, hspec-wai >= 0.5.0, hspec-wai-json
|
||||
, HDBC, HDBC-postgresql
|
||||
, warp, wai >= 3.0.1 && < 3.0.2
|
||||
, HTTP, convertible
|
||||
|
||||
@@ -64,7 +64,7 @@ spec = around appWithFixture $ do
|
||||
`shouldRespondWith` ResponseMatcher {
|
||||
matchBody = Nothing,
|
||||
matchStatus = 201,
|
||||
matchHeaders = [("Location", "/compound_pk?k1=eq.12&k2=eq.42")]
|
||||
matchHeaders = ["Location" <:> "/compound_pk?k1=eq.12&k2=eq.42"]
|
||||
}
|
||||
|
||||
describe "Putting record" $ do
|
||||
|
||||
@@ -17,7 +17,7 @@ spec = around appWithFixture $ do
|
||||
`shouldRespondWith` ResponseMatcher {
|
||||
matchBody = Just "[{\"id\":5}]"
|
||||
, matchStatus = 200
|
||||
, matchHeaders = [("Content-Range", "0-0/1")]
|
||||
, matchHeaders = ["Content-Range" <:> "0-0/1"]
|
||||
}
|
||||
|
||||
describe "Canonical location" $
|
||||
@@ -26,5 +26,5 @@ spec = around appWithFixture $ do
|
||||
`shouldRespondWith` ResponseMatcher {
|
||||
matchBody = Nothing
|
||||
, matchStatus = 204
|
||||
, matchHeaders = [("Content-Location", "/no_pk?a=eq.1&b=eq.1")]
|
||||
, matchHeaders = ["Content-Location" <:> "/no_pk?a=eq.1&b=eq.1"]
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ spec = around appWithFixture $
|
||||
`shouldRespondWith` ResponseMatcher {
|
||||
matchBody = Nothing
|
||||
, matchStatus = 204
|
||||
, matchHeaders = [("Content-Range", "*/0")]
|
||||
, matchHeaders = ["Content-Range" <:> "*/0"]
|
||||
}
|
||||
|
||||
it "allows one-item requests" $ do
|
||||
@@ -70,7 +70,7 @@ spec = around appWithFixture $
|
||||
`shouldRespondWith` ResponseMatcher {
|
||||
matchBody = Nothing
|
||||
, matchStatus = 416
|
||||
, matchHeaders = [("Content-Range", "*/0")]
|
||||
, matchHeaders = ["Content-Range" <:> "*/0"]
|
||||
}
|
||||
|
||||
it "refuses a range requesting start past last item" $
|
||||
@@ -79,5 +79,5 @@ spec = around appWithFixture $
|
||||
`shouldRespondWith` ResponseMatcher {
|
||||
matchBody = Nothing
|
||||
, matchStatus = 416
|
||||
, matchHeaders = [("Content-Range", "*/15")]
|
||||
, matchHeaders = ["Content-Range" <:> "*/15"]
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ spec = around appWithFixture $ do
|
||||
|
||||
describe "Table info" $
|
||||
it "is available with OPTIONS verb" $
|
||||
-- {{{ big json object
|
||||
request methodOptions "/auto_incrementing_pk" [] "" `shouldRespondWith` [json|
|
||||
{
|
||||
"pkey":["id"],
|
||||
@@ -69,4 +68,3 @@ spec = around appWithFixture $ do
|
||||
"position":2}}
|
||||
}
|
||||
|]
|
||||
-- }}}
|
||||
|
||||
Reference in New Issue
Block a user