From 51194425997225de7b7ca83e26b76b9a82f0e10d Mon Sep 17 00:00:00 2001 From: Arnaud Bailly Date: Tue, 4 Nov 2025 08:09:35 +0100 Subject: Scaffold RESTish API for challenge --- lambda-calcul/haskell/test/Minilang/ServerSpec.hs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lambda-calcul/haskell/test/Minilang/ServerSpec.hs (limited to 'lambda-calcul/haskell/test') 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 -- cgit v1.3.1