Prompt for password change when using 'jrnl --encrypt' on already encrypted journal (#1477)

* Create new password if journal already encrypted.
* Add test for encrypting already encrypted journal.
This commit is contained in:
Jonathan van der Steege 2022-05-21 23:11:55 +02:00 committed by GitHub
parent 7771afc1a7
commit 663f151974
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

View file

@ -24,10 +24,11 @@ Feature: Encrypting and decrypting journals
2013-06-10 15:40 Life is good.
@todo
Scenario: Trying to encrypt an already encrypted journal
# This should warn the user that the journal is already encrypted
Given we use the config "encrypted.yaml"
When we run "jrnl --encrypt" and enter "bad doggie no biscuit"
Then the output should contain "already encrypted. Create a new password."
Then we should be prompted for a password
Scenario Outline: Encrypting a journal
Given we use the config "simple.yaml"