diff --git a/test/Web/ScottySpec.hs b/test/Web/ScottySpec.hs index bd8dd486..943bc410 100644 --- a/test/Web/ScottySpec.hs +++ b/test/Web/ScottySpec.hs @@ -116,9 +116,13 @@ spec = do large `shouldRespondWith` 413 describe "ActionM" $ do - withApp (Scotty.get "/" $ (undefined `EL.catch` ((\_ -> html "") :: E.SomeException -> ActionM ()))) $ do - it "has a MonadBaseControl instance" $ do - get "/" `shouldRespondWith` 200 + context "MonadBaseControl instance" $ do + withApp (Scotty.get "/" $ (undefined `EL.catch` ((\_ -> html "") :: E.SomeException -> ActionM ()))) $ do + it "catches SomeException and returns 200" $ do + get "/" `shouldRespondWith` 200 + withApp (Scotty.get "/" $ EL.throwIO E.DivideByZero) $ do + it "returns 500 on uncaught exceptions" $ do + get "/" `shouldRespondWith` "