From b305546950a6742f25023e2ffece423905e1bda8 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 28 Dec 2024 20:27:04 +0530 Subject: Refactor mode data type --- specs/Specs/ArgsSpec.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'specs/Specs/ArgsSpec.hs') diff --git a/specs/Specs/ArgsSpec.hs b/specs/Specs/ArgsSpec.hs index caaab75..8a97623 100644 --- a/specs/Specs/ArgsSpec.hs +++ b/specs/Specs/ArgsSpec.hs @@ -20,10 +20,10 @@ test = do context "when args contains -m or --mode with a valid mode" $ do it "parses configuration with mode" $ do - parseArgs ["-m", "search"] `shouldBe` Right (def {configMode = defaultSearchMode}) - parseArgs ["--mode", "search"] `shouldBe` Right (def {configMode = defaultSearchMode}) - parseArgs ["-m", "hints"] `shouldBe` Right (def {configMode = defaultHintsMode}) - parseArgs ["--mode", "hints"] `shouldBe` Right (def {configMode = defaultHintsMode}) + parseArgs ["-m", "search"] `shouldBe` Right (def {configMode = ModeSearch def}) + parseArgs ["--mode", "search"] `shouldBe` Right (def {configMode = ModeSearch def}) + parseArgs ["-m", "hints"] `shouldBe` Right (def {configMode = ModeHints def}) + parseArgs ["--mode", "hints"] `shouldBe` Right (def {configMode = ModeHints def}) context "when args contains -m or --mode with an invalid mode" $ do it "returns with error message" $ do -- cgit v1.3.1