From 9f3cb4ffe4383ffbdb0662bd6b187cd68a1f1942 Mon Sep 17 00:00:00 2001 From: Steffen Jost Date: Mon, 5 Sep 2022 16:06:07 +0200 Subject: [PATCH] Revert "bad(idea): deactivate failig tests to release - revert me please" This reverts commit 5b8f77ac974da0fe9f7f7e81c3c4762bf907eb08. --- test/Handler/HomeSpec.hs | 7 +------ test/Handler/ProfileSpec.hs | 7 +------ test/Handler/Utils/SubmissionSpec.hs | 8 ++------ 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/test/Handler/HomeSpec.hs b/test/Handler/HomeSpec.hs index 716c42686..8b77d1a6e 100644 --- a/test/Handler/HomeSpec.hs +++ b/test/Handler/HomeSpec.hs @@ -1,16 +1,11 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS -Wno-unused-top-binds #-} module Handler.HomeSpec (spec) where import TestImport spec :: Spec --- spec = test_spec -spec = return () -- TODO: tests deactivated -- build/release problem - -test_spec :: Spec -test_spec = withApp $ do +spec = withApp $ do describe "Homepage" $ do it "loads the index and checks it looks right" $ do request $ do diff --git a/test/Handler/ProfileSpec.hs b/test/Handler/ProfileSpec.hs index d3cef77ba..280db8528 100644 --- a/test/Handler/ProfileSpec.hs +++ b/test/Handler/ProfileSpec.hs @@ -1,6 +1,5 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} -{-# OPTIONS -Wno-unused-top-binds #-} module Handler.ProfileSpec (spec) where import TestImport @@ -10,11 +9,7 @@ import qualified Data.CaseInsensitive as CI import Yesod.Core.Handler (toTextUrl) spec :: Spec --- spec = test_spec -spec = return () -- TODO: tests deactivated -- build/release problem - -test_spec :: Spec -test_spec = withApp $ do +spec = withApp $ do describe "Profile page" $ do it "asserts no access to my-account for anonymous users" $ do get ProfileR diff --git a/test/Handler/Utils/SubmissionSpec.hs b/test/Handler/Utils/SubmissionSpec.hs index 6bd4ec9ae..248182951 100644 --- a/test/Handler/Utils/SubmissionSpec.hs +++ b/test/Handler/Utils/SubmissionSpec.hs @@ -1,5 +1,4 @@ {-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-} -{-# OPTIONS -Wno-unused-top-binds #-} module Handler.Utils.SubmissionSpec where @@ -35,9 +34,6 @@ import Control.Lens.Extras (is) import Data.Maybe (fromJust) -spec :: Spec --- spec = test_spec -spec = return () -- TODO: tests deactivated since submissions are currently not used -- build/release problem userNumber :: TVar Natural userNumber = unsafePerformIO $ newTVarIO 1 @@ -125,8 +121,8 @@ distributionExample mkParameters setupHook cont = do return (entityVal <$> key, Set.singleton (subId, sheet)) -test_spec :: Spec -test_spec = withApp . describe "Submission distribution" $ do +spec :: Spec +spec = withApp . describe "Submission distribution" $ do it "is fair" $ distributionExample (return [(500, replicate 10 (Just $ Load Nothing 1 1))])