@@ -80,7 +80,7 @@ spec = do
80
80
authSpec :: Spec
81
81
authSpec
82
82
= describe " The Auth combinator"
83
- $ around (testWithApplication . return $ app jwtAndCookieApi) $ do
83
+ $ aroundAll (testWithApplication . return $ app jwtAndCookieApi) $ do
84
84
85
85
it " returns a 401 if all authentications are Indefinite" $ \ port -> do
86
86
get (url port) `shouldHTTPErrorWith` status401
@@ -172,7 +172,7 @@ cookieAuthSpec :: Spec
172
172
cookieAuthSpec
173
173
= describe " The Auth combinator" $ do
174
174
describe " With XSRF check" $
175
- around (testWithApplication . return $ app cookieOnlyApi) $ do
175
+ aroundAll (testWithApplication . return $ app cookieOnlyApi) $ do
176
176
177
177
it " fails if XSRF header and cookie don't match" $ \ port -> property
178
178
$ \ (user :: User ) -> do
@@ -243,7 +243,7 @@ cookieAuthSpec
243
243
describe " With no XSRF check for GET requests" $ let
244
244
noXsrfGet xsrfCfg = xsrfCfg { xsrfExcludeGet = True }
245
245
cookieCfgNoXsrfGet = cookieCfg { cookieXsrfSetting = fmap noXsrfGet $ cookieXsrfSetting cookieCfg }
246
- in around (testWithApplication . return $ appWithCookie cookieOnlyApi cookieCfgNoXsrfGet) $ do
246
+ in aroundAll (testWithApplication . return $ appWithCookie cookieOnlyApi cookieCfgNoXsrfGet) $ do
247
247
248
248
it " succeeds with no XSRF header or cookie for GET" $ \ port -> property
249
249
$ \ (user :: User ) -> do
@@ -260,7 +260,7 @@ cookieAuthSpec
260
260
261
261
describe " With no XSRF check at all" $ let
262
262
cookieCfgNoXsrf = cookieCfg { cookieXsrfSetting = Nothing }
263
- in around (testWithApplication . return $ appWithCookie cookieOnlyApi cookieCfgNoXsrf) $ do
263
+ in aroundAll (testWithApplication . return $ appWithCookie cookieOnlyApi cookieCfgNoXsrf) $ do
264
264
265
265
it " succeeds with no XSRF header or cookie for GET" $ \ port -> property
266
266
$ \ (user :: User ) -> do
@@ -313,7 +313,7 @@ cookieAuthSpec
313
313
jwtAuthSpec :: Spec
314
314
jwtAuthSpec
315
315
= describe " The JWT combinator"
316
- $ around (testWithApplication . return $ app jwtOnlyApi) $ do
316
+ $ aroundAll (testWithApplication . return $ app jwtOnlyApi) $ do
317
317
318
318
it " fails if 'aud' does not match predicate" $ \ port -> property $
319
319
\ (user :: User ) -> do
@@ -378,7 +378,7 @@ jwtAuthSpec
378
378
379
379
basicAuthSpec :: Spec
380
380
basicAuthSpec = describe " The BasicAuth combinator"
381
- $ around (testWithApplication . return $ app basicAuthApi) $ do
381
+ $ aroundAll (testWithApplication . return $ app basicAuthApi) $ do
382
382
383
383
it " succeeds with the correct password and username" $ \ port -> do
384
384
resp <- getWith (defaults & auth ?~ basicAuth " ali" " Open sesame" ) (url port)
0 commit comments