mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-07 16:56:13 +02:00
Prevent filtered deletion from deleting entire journal #932 and add lots of deletion tests
This commit is contained in:
parent
3820c1f4ba
commit
1c2432ba08
6 changed files with 186 additions and 5 deletions
|
@ -257,6 +257,13 @@ def check_journal_content(context, text, journal_name="default"):
|
|||
assert text in journal, journal
|
||||
|
||||
|
||||
@then('the journal should not contain "{text}"')
|
||||
@then('journal "{journal_name}" should not contain "{text}"')
|
||||
def check_not_journal_content(context, text, journal_name="default"):
|
||||
journal = read_journal(journal_name)
|
||||
assert text not in journal, journal
|
||||
|
||||
|
||||
@then('journal "{journal_name}" should not exist')
|
||||
def journal_doesnt_exist(context, journal_name="default"):
|
||||
with open(install.CONFIG_FILE_PATH) as config_file:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue