Implement "should" and "should not" handling

- Handling should and should not like this should reduce the amount of
  fixtures we need for the test suite
- Add more password tests

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
This commit is contained in:
Jonathan Wren 2021-03-20 15:52:23 -07:00
parent c76ee8cd4f
commit e720430aa4
2 changed files with 49 additions and 7 deletions

View file

@ -89,3 +89,17 @@ Feature: Using the installed keyring
And the output should contain "Failed to retrieve keyring"
And the output should contain "2013-06-10 15:40 Life is good"
Scenario: Mistyping your password
Given we use the config "simple.yaml"
When we run "jrnl --encrypt" and enter
swordfish
sordfish
Then we should be prompted for a password
And we should see the message "Passwords did not match"
And the config for journal "default" should not have "encrypt" set
When we run "jrnl --short"
Then the output should be
2013-06-09 15:39 My first entry.
2013-06-10 15:40 Life is good.