add tests

This commit is contained in:
dbxnr 2020-02-11 22:46:35 +00:00
parent 774355971a
commit 16a4e60582
4 changed files with 20 additions and 14 deletions

View file

@ -13,15 +13,21 @@ Feature: Day One 2.0 implementation details.
Then we should get no error
and the output should contain "not the expected Day One 2 format."
Scenario: Verify conversion to jrnl
Scenario: Converted journal is added to config
Given we use the config "basic.yaml"
When we run "jrnl --import dayone2 features/data/journals/dayone2.json"
When we run "jrnl -ls"
Then the output should be
"""
2013-06-09 15:39 My first entry.
| Everything is alright
Then the output should contain "dayone2.txt"
And the output should contain "default"
2013-06-10 15:40 Life is good.
| But I'm better.
Scenario: Converted journal is validated
Given we use the config "basic.yaml"
When we run "jrnl --import dayone2 features/data/journals/dayone2.json"
When we run "jrnl dayone2 -n 10"
Then the output should contain
"""
10-01-2020 12:21 Entry Number Two.
| With some body.
10-01-2020 12:22 Entry Number One.
"""