summaryrefslogtreecommitdiff
path: root/lambda-calcul/haskell/test/Minilang
diff options
context:
space:
mode:
authorArnaud Bailly <arnaud@pankzsoft.com>2025-11-04 08:09:35 +0100
committerArnaud Bailly <arnaud@pankzsoft.com>2025-11-04 08:09:35 +0100
commit51194425997225de7b7ca83e26b76b9a82f0e10d (patch)
tree7faf74f783ea4ddf2e08fe6be3b536e6e7a8500f /lambda-calcul/haskell/test/Minilang
parent46d312450863eb8eb82fd8c33f7f80705de52cdb (diff)
downloadlambda-nantes-51194425997225de7b7ca83e26b76b9a82f0e10d.tar.gz
Scaffold RESTish API for challenge
Diffstat (limited to 'lambda-calcul/haskell/test/Minilang')
-rw-r--r--lambda-calcul/haskell/test/Minilang/ServerSpec.hs15
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