Skip to content

Commit

Permalink
bump version to 0.18.3 (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
silky committed Jul 27, 2021
1 parent c88b133 commit 8dc074c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
resolver: lts-13.8
resolver: lts-18.3
packages:
- '.'
8 changes: 4 additions & 4 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
packages: []
snapshots:
- completed:
size: 495203
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/13/8.yaml
sha256: 91139b0de6b320b13e27d5e6e6c368e239974b06fb9dc86d8d96da08697972ac
original: lts-13.8
size: 585603
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/3.yaml
sha256: 694573e96dca34db5636edb1fe6c96bb233ca0f9fb96c1ead1671cdfa9bd73e9
original: lts-18.3
7 changes: 3 additions & 4 deletions test/AppSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module AppSpec where
import Control.Exception (throwIO)
import Network.HTTP.Client (Manager, newManager, defaultManagerSettings)
import Network.HTTP.Types
import Network.Wai (Application)
import Network.Wai.Handler.Warp
import Servant
import Servant.Client
Expand All @@ -29,9 +28,9 @@ spec = do
it "throws a 404 for missing items" $ \ env -> do
try env (getItem 42) `shouldThrow` errorsWithStatus notFound404

errorsWithStatus :: Status -> ServantError -> Bool
errorsWithStatus :: Status -> ClientError -> Bool
errorsWithStatus status servantError = case servantError of
FailureResponse response -> responseStatusCode response == status
FailureResponse _ response -> responseStatusCode response == status
_ -> False

withClient :: IO Application -> SpecWith ClientEnv -> SpecWith ()
Expand All @@ -40,7 +39,7 @@ withClient x innerSpec =
flip aroundWith innerSpec $ \ action -> \ httpManager -> do
testWithApplication x $ \ port -> do
let testBaseUrl = BaseUrl Http "localhost" port ""
action (ClientEnv httpManager testBaseUrl Nothing)
action (mkClientEnv httpManager testBaseUrl)

type Host = (Manager, BaseUrl)

Expand Down

0 comments on commit 8dc074c

Please sign in to comment.