From 9b88f1025545d30add58d822250055932596fa74 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Thu, 16 May 2019 09:55:25 +0200 Subject: [PATCH] check version returned by CLI is the same as in cabal file --- .../test/integration/Test/Integration/Scenario/CLISpec.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/http-bridge/test/integration/Test/Integration/Scenario/CLISpec.hs b/lib/http-bridge/test/integration/Test/Integration/Scenario/CLISpec.hs index 08b8c550967..f6eca6a4009 100644 --- a/lib/http-bridge/test/integration/Test/Integration/Scenario/CLISpec.hs +++ b/lib/http-bridge/test/integration/Test/Integration/Scenario/CLISpec.hs @@ -43,7 +43,9 @@ specNoCluster = do it "CLI - Shows version" $ do Stdout out <- command [] "cardano-wallet" ["--version"] cabal <- readFile "../../cardano-wallet.cabal" - cabal `shouldContain` out + let cabalVersion = ( words $ (lines cabal) !! 1 ) !! 1 + let returnedVersion = T.unpack $ T.dropEnd 1 (T.pack out) + returnedVersion `shouldBe` cabalVersion it "CLI - Can generate mnemonics with default size" $ do Stdout out <- command [] "cardano-wallet" ["mnemonic", "generate"]