From 55767ffb4b6d7bd201b30e90d31d0f4c2cc9bf1c Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 29 Oct 2022 21:36:34 -0700 Subject: [PATCH] Add double encryption test --- tests/bdd/features/encrypt.feature | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/bdd/features/encrypt.feature b/tests/bdd/features/encrypt.feature index 5c201361..b5ef1126 100644 --- a/tests/bdd/features/encrypt.feature +++ b/tests/bdd/features/encrypt.feature @@ -46,6 +46,22 @@ Feature: Encrypting and decrypting journals Then we should be prompted for a password And the output should contain "2013-06-10 15:40 Life is good" + Scenario: Encrypt journal twice and get prompted each time + Given we use the config "simple.yaml" + When we run "jrnl --encrypt" and enter + swordfish + swordfish + y + Then we should get no error + And the output should contain "Journal encrypted" + When we run "jrnl --encrypt" and enter + swordfish + swordfish + y + Then we should get no error + And the output should contain "Journal default is already encrypted. Create a new password." + And we should be prompted for a password + And the config for journal "default" should contain "encrypt: true" Scenario Outline: Running jrnl with encrypt: true on unencryptable journals Given we use the config ""