diff options
Diffstat (limited to 'lambda-calcul/haskell/test/Minilang/ServerSpec.hs')
| -rw-r--r-- | lambda-calcul/haskell/test/Minilang/ServerSpec.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lambda-calcul/haskell/test/Minilang/ServerSpec.hs b/lambda-calcul/haskell/test/Minilang/ServerSpec.hs new file mode 100644 index 0000000..309ded8 --- /dev/null +++ b/lambda-calcul/haskell/test/Minilang/ServerSpec.hs @@ -0,0 +1,15 @@ +module Minilang.ServerSpec where + +import Minilang.Server (serveAPI) +import Network.Wai (Application) +import Test.Hspec (Spec, it) +import Test.Hspec.Wai (get, shouldRespondWith, with) + +spec :: Spec +spec = with app $ + it "GET /api/leaderboard returns empty list of scores" $ do + get "/api/leaderboard" + `shouldRespondWith` "[]" + +app :: IO Application +app = pure serveAPI |
