From 218ebe180dfd1e1bedefcf09f7419b19a4981d66 Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 13 Nov 2021 15:41:05 -0800 Subject: [PATCH] Add test for modifying an entry rather than replacing it --- tests/bdd/features/write.feature | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/bdd/features/write.feature b/tests/bdd/features/write.feature index 37a8858b..29af9b9e 100644 --- a/tests/bdd/features/write.feature +++ b/tests/bdd/features/write.feature @@ -265,7 +265,7 @@ Feature: Writing new entries. #| basic_dayone.yaml | @todo - Scenario Outline: Correctly count modification when running --edit on a single entry + Scenario Outline: Correctly count modification when running --edit to replace a single entry Given we use the config "" And we use the password "test" if prompted And we write to the editor if opened @@ -282,3 +282,18 @@ Feature: Writing new entries. #| basic_dayone.yaml | @todo + Scenario Outline: Correctly count modification when running --edit on whole journal and adding to last entry + Given we use the config "" + And we use the password "test" if prompted + And we append to the editor if opened + This is a small addendum to my latest entry. + When we run "jrnl --edit" + Then the output should contain + [1 entry modified] + + Examples: configs + | config_file | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_folder.yaml | + #| basic_dayone.yaml | @todo