on master help sign in
Fix hspec-wai issue
commit85feb31cbbdf6512bc49ee9ad7a379ca0ae84c7e authorOleg Grenrus <oleg.grenrus@iki.fi> dateSun 1 Jan 2017, 20:52 (10 years ago) parent1f00a68
4 files changed+21−7
servant-server/servant-server.cabal+1−1 servant-server/test/Servant/Server/ErrorSpec.hs+8−2 stack-ghc-7.8.4.yaml+6−4 stack.yaml+6
servant-server/servant-server.cabal+1−1
@@ -117,7 +117,7 @@ test-suite spec
117117 , directory
118118 , exceptions
119119 , hspec == 2.*
120− , hspec-wai
120+ , hspec-wai >= 0.8 && <0.9
121121 , http-types
122122 , network >= 2.6
123123 , QuickCheck
servant-server/test/Servant/Server/ErrorSpec.hs+8−2
@@ -211,11 +211,17 @@ errorRetrySpec =
211211
212212 it "should continue when URLs don't match" $ do
213213 request methodPost "" [jsonCT, jsonAccept] jsonBody
214− `shouldRespondWith` 200 { matchBody = Just $ encode (8 :: Int) }
214+ `shouldRespondWith` 200 { matchBody = mkBody $ encode (8 :: Int) }
215215
216216 it "should continue when methods don't match" $ do
217217 request methodGet "a" [jsonCT, jsonAccept] jsonBody
218− `shouldRespondWith` 200 { matchBody = Just $ encode (4 :: Int) }
218+ `shouldRespondWith` 200 { matchBody = mkBody $ encode (4 :: Int) }
219+ where
220+ mkBody b = MatchBody $ \_ b' ->
221+ if b == b'
222+ then Nothing
223+ else Just "body not correct\n"
224+
219225
220226-- }}}
221227------------------------------------------------------------------------------
stack-ghc-7.8.4.yaml+6−4
@@ -10,10 +10,12 @@ extra-deps:
1010- control-monad-omega-0.3.1
1111- cryptonite-0.6
1212- doctest-0.11.0
13−- hspec-2.2.3
14−- hspec-core-2.2.3
15−- hspec-discover-2.2.3
16−- hspec-expectations-0.7.2
13+- hspec-2.3.2
14+- hspec-discover-2.3.2
15+- hspec-core-2.3.2
16+- hspec-wai-0.8.0
17+- hspec-expectations-0.8.2
18+- call-stack-0.1.0
1719- http-api-data-0.3
1820- natural-transformation-0.4
1921- primitive-0.6.1.0
stack.yaml+6
@@ -10,4 +10,10 @@ extra-deps:
1010- http-api-data-0.3
1111- servant-js-0.9 # needed for tutorial
1212- natural-transformation-0.4
13+- hspec-2.3.2
14+- hspec-discover-2.3.2
15+- hspec-core-2.3.2
16+- hspec-wai-0.8.0
17+- hspec-expectations-0.8.2
18+- call-stack-0.1.0
1319resolver: lts-6.0