Fix hspec-wai issue
This commit is contained in:
parent
1f00a68937
commit
85feb31cbb
4 changed files with 21 additions and 7 deletions
|
@ -117,7 +117,7 @@ test-suite spec
|
||||||
, directory
|
, directory
|
||||||
, exceptions
|
, exceptions
|
||||||
, hspec == 2.*
|
, hspec == 2.*
|
||||||
, hspec-wai
|
, hspec-wai >= 0.8 && <0.9
|
||||||
, http-types
|
, http-types
|
||||||
, network >= 2.6
|
, network >= 2.6
|
||||||
, QuickCheck
|
, QuickCheck
|
||||||
|
|
|
@ -211,11 +211,17 @@ errorRetrySpec =
|
||||||
|
|
||||||
it "should continue when URLs don't match" $ do
|
it "should continue when URLs don't match" $ do
|
||||||
request methodPost "" [jsonCT, jsonAccept] jsonBody
|
request methodPost "" [jsonCT, jsonAccept] jsonBody
|
||||||
`shouldRespondWith` 200 { matchBody = Just $ encode (8 :: Int) }
|
`shouldRespondWith` 200 { matchBody = mkBody $ encode (8 :: Int) }
|
||||||
|
|
||||||
it "should continue when methods don't match" $ do
|
it "should continue when methods don't match" $ do
|
||||||
request methodGet "a" [jsonCT, jsonAccept] jsonBody
|
request methodGet "a" [jsonCT, jsonAccept] jsonBody
|
||||||
`shouldRespondWith` 200 { matchBody = Just $ encode (4 :: Int) }
|
`shouldRespondWith` 200 { matchBody = mkBody $ encode (4 :: Int) }
|
||||||
|
where
|
||||||
|
mkBody b = MatchBody $ \_ b' ->
|
||||||
|
if b == b'
|
||||||
|
then Nothing
|
||||||
|
else Just "body not correct\n"
|
||||||
|
|
||||||
|
|
||||||
-- }}}
|
-- }}}
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
|
@ -10,10 +10,12 @@ extra-deps:
|
||||||
- control-monad-omega-0.3.1
|
- control-monad-omega-0.3.1
|
||||||
- cryptonite-0.6
|
- cryptonite-0.6
|
||||||
- doctest-0.11.0
|
- doctest-0.11.0
|
||||||
- hspec-2.2.3
|
- hspec-2.3.2
|
||||||
- hspec-core-2.2.3
|
- hspec-discover-2.3.2
|
||||||
- hspec-discover-2.2.3
|
- hspec-core-2.3.2
|
||||||
- hspec-expectations-0.7.2
|
- hspec-wai-0.8.0
|
||||||
|
- hspec-expectations-0.8.2
|
||||||
|
- call-stack-0.1.0
|
||||||
- http-api-data-0.3
|
- http-api-data-0.3
|
||||||
- natural-transformation-0.4
|
- natural-transformation-0.4
|
||||||
- primitive-0.6.1.0
|
- primitive-0.6.1.0
|
||||||
|
|
|
@ -10,4 +10,10 @@ extra-deps:
|
||||||
- http-api-data-0.3
|
- http-api-data-0.3
|
||||||
- servant-js-0.9 # needed for tutorial
|
- servant-js-0.9 # needed for tutorial
|
||||||
- natural-transformation-0.4
|
- natural-transformation-0.4
|
||||||
|
- hspec-2.3.2
|
||||||
|
- hspec-discover-2.3.2
|
||||||
|
- hspec-core-2.3.2
|
||||||
|
- hspec-wai-0.8.0
|
||||||
|
- hspec-expectations-0.8.2
|
||||||
|
- call-stack-0.1.0
|
||||||
resolver: lts-6.0
|
resolver: lts-6.0
|
||||||
|
|
Loading…
Reference in a new issue