mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 08:38:32 +02:00
Adds regression test for #87
This commit is contained in:
parent
598c0e97ce
commit
3549eff215
2 changed files with 13 additions and 0 deletions
8
features/regression.feature
Normal file
8
features/regression.feature
Normal file
|
@ -0,0 +1,8 @@
|
|||
Feature: Zapped bugs should stay dead.
|
||||
|
||||
Scenario: Writing an entry does not print the entire journal
|
||||
Given we use the config "basic.json"
|
||||
When we run "jrnl 23 july 2013: A cold and stormy day. I ate crisps on the sofa."
|
||||
Then we should see the message "Entry added"
|
||||
When we run "jrnl -n 1"
|
||||
Then the output should not contain "Life is good"
|
|
@ -102,6 +102,11 @@ def check_output_inline(context, text):
|
|||
out = context.stdout_capture.getvalue()
|
||||
assert text in out
|
||||
|
||||
@then('the output should not contain "{text}"')
|
||||
def check_output_not_inline(context, text):
|
||||
out = context.stdout_capture.getvalue()
|
||||
assert text not in out
|
||||
|
||||
@then('we should see the message "{text}"')
|
||||
def check_message(context, text):
|
||||
out = context.messages.getvalue()
|
||||
|
|
Loading…
Add table
Reference in a new issue