diff --git a/dbapi.cabal b/dbapi.cabal index 162fbbb66..97e106cb8 100644 --- a/dbapi.cabal +++ b/dbapi.cabal @@ -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 diff --git a/test/Feature/InsertSpec.hs b/test/Feature/InsertSpec.hs index 1a2835bd7..1442639ce 100644 --- a/test/Feature/InsertSpec.hs +++ b/test/Feature/InsertSpec.hs @@ -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 diff --git a/test/Feature/QuerySpec.hs b/test/Feature/QuerySpec.hs index 765ee9728..0d8fed652 100644 --- a/test/Feature/QuerySpec.hs +++ b/test/Feature/QuerySpec.hs @@ -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"] } diff --git a/test/Feature/RangeSpec.hs b/test/Feature/RangeSpec.hs index dbe8df738..15dd6dd43 100644 --- a/test/Feature/RangeSpec.hs +++ b/test/Feature/RangeSpec.hs @@ -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"] } diff --git a/test/Feature/StructureSpec.hs b/test/Feature/StructureSpec.hs index 0ebbee684..89b44af3d 100644 --- a/test/Feature/StructureSpec.hs +++ b/test/Feature/StructureSpec.hs @@ -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}} } |] - -- }}}