Interactive delete (#850)

* fixup alichtman's implementation
* cleanup imports

Co-authored-by: Aaron Lichtman <aaronlichtman@gmail.com>
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
This commit is contained in:
dbxnr 2020-03-21 20:22:30 +00:00
parent f4fca3e5a4
commit 15429d4f61
4 changed files with 36 additions and 25 deletions

View file

@ -93,17 +93,3 @@ Feature: Basic reading and writing to a journal
2013-06-10 15:40 Life is good.
"""
And we should get no error
# The input for this test is <SPACE><ENTER>y
Scenario: --delete flag allows deletion of single entry
Given we use the config "deletion.yaml"
When we run "jrnl --delete"
And we type " "
And we type
"""
y
"""
When we run "jrnl -on 2019-10-29 -s"
Then the output should not contain "2019-10-29 11:11 First entry."

20
features/delete.feature Normal file
View file

@ -0,0 +1,20 @@
Feature: Delete entries from journal
Scenario: --delete flag allows deletion of single entry
Given we use the config "deletion.yaml"
When we run "jrnl -n 1"
Then the output should contain
"""
2019-10-29 11:13 Third entry.
"""
When we run "jrnl --delete" and enter
"""
N
N
Y
"""
When we run "jrnl -n 1"
Then the output should contain
"""
2019-10-29 11:11 Second entry.
"""