upgrade hspec-wai, get tests passing.

This commit is contained in:
Adam C. Baker
2014-09-24 19:08:05 -07:00
parent 7f9e97b16d
commit cf5510c425
5 changed files with 7 additions and 9 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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"]
}
+3 -3
View File
@@ -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"]
}
-2
View File
@@ -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}}
}
|]
-- }}}