Confirm primary config file isn't modified when encrypting/decrypting a journal in an alternate config file

This commit is contained in:
Micah Jerome Ellison 2021-10-23 14:22:46 -07:00
parent 1ff226c881
commit 2d142eb995

View file

@ -75,3 +75,18 @@ Feature: Multiple journals
n
Then we should see the message "Encrypted journal 'new_encrypted' created"
Scenario: Don't overwrite main config when encrypting a journal in an alternate config
Given the config "basic_onefile.yaml" exists
And we use the config "multiple.yaml"
When we run "jrnl --cf basic_onefile.yaml --encrypt" and enter
these three eyes
these three eyes
n
Then we should see the message "Journal encrypted to features/journals/basic_onefile.journal"
And the config should contain "encrypt: false" # multiple.yaml remains unchanged
Scenario: Don't overwrite main config when decrypting a journal in an alternate config
Given the config "editor_encrypted.yaml" exists
And we use the config "basic_encrypted.yaml"
When we run "jrnl --cf editor_encrypted.yaml --decrypt"
Then the config should contain "encrypt: true" # basic_encrypted remains unchanged