From 962e35e2d9bfc85a1f4632b8d6b2c4dca6debdf4 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 27 Aug 2022 12:28:07 -0700 Subject: [PATCH] Add positive and negative tests for "Entry added" message behavior --- tests/bdd/features/write.feature | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/bdd/features/write.feature b/tests/bdd/features/write.feature index cc5b5491..33b81cdd 100644 --- a/tests/bdd/features/write.feature +++ b/tests/bdd/features/write.feature @@ -313,3 +313,24 @@ Feature: Writing new entries. | basic_encrypted.yaml | | basic_folder.yaml | | basic_dayone.yaml | + + Scenario Outline: No "Entry added" message should appear when writing to the default journal + Given we use the config "" + And we use the password "test" if prompted + When we run "jrnl This is a new entry" + Then the output should not contain "Entry added" + And we should get no error + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + | basic_dayone.yaml | + + Scenario: An "Entry added" message should appear when writing to a non-default journal + Given we use the config "multiple.yaml" + And we use the password "test" if prompted + When we run "jrnl work This is a new entry" + Then the output should contain "Entry added to work journal" + And we should get no error