Skip to content
Permalink
Browse files

add negative test for generate mnemonic

  • Loading branch information...
KtorZ committed May 16, 2019
1 parent 13d8d05 commit e82e0e95ebd831f3a5377db513260d6c3c12863d
Showing with 9 additions and 1 deletion.
  1. +9 −1 lib/http-bridge/test/integration/Test/Integration/Scenario/CLISpec.hs
@@ -61,10 +61,18 @@ specNoCluster = do
c `shouldBe` ExitSuccess

it "CLI - Can generate mnemonics with default size" $ do
(Exit c, Stdout out) <- command [] "cardano-wallet" ["mnemonic", "generate"]
(Exit c, Stdout out) <- command [] "cardano-wallet"
["mnemonic", "generate"]
length (words out) `shouldBe` 15
c `shouldBe` ExitSuccess

it "CLI - It can't generate mnemonics with an invalid size" $ do
(Exit c, Stdout out, Stderr err) <- command [] "cardano-wallet"
["mnemonic", "generate", "--size", "14"]
c `shouldBe` ExitFailure 1
err `shouldBe` "Invalid mnemonic size. Expected one of: 9,12,15,18,21,24\n"
out `shouldBe` mempty

describe "CLI - Can generate mnemonics with different sizes" $ do
let test size = it ("--size=" <> show size) $ do
(Exit c, Stdout out) <- command [] "cardano-wallet"

0 comments on commit e82e0e9

Please sign in to comment.
You can’t perform that action at this time.