mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-06 16:26:13 +02:00
add some tests, black formatting
This commit is contained in:
parent
608f920d8f
commit
0c73448516
7 changed files with 68 additions and 34 deletions
|
@ -2,14 +2,26 @@ Feature: Day One 2.0 implementation details.
|
|||
|
||||
|
||||
Scenario: Loading a Day One 2.0 journal
|
||||
Given we use the config "dayone2.yaml"
|
||||
When we run "jrnl -n 2"
|
||||
Given we use the config "basic.yaml"
|
||||
When we run "jrnl --import dayone2 features/data/journals/dayone2.json"
|
||||
Then we should get no error
|
||||
and the output should be
|
||||
"""
|
||||
2020-01-10 12:21 Entry Number Two.
|
||||
| And a bit of text over here.
|
||||
and the output should contain "Journal exported to"
|
||||
|
||||
2020-01-10 12:22 Entry Number One.
|
||||
"""
|
||||
Scenario: Day One 2.0 schema validation fails
|
||||
Given we use the config "basic.yaml"
|
||||
When we run "jrnl --import dayone2 features/data/journals/not_dayone2.json"
|
||||
Then we should get no error
|
||||
and the output should contain "not the expected Day One 2 format."
|
||||
|
||||
Scenario: Verify conversion to jrnl
|
||||
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
|
||||
|
||||
2013-06-10 15:40 Life is good.
|
||||
| But I'm better.
|
||||
"""
|
Loading…
Add table
Add a link
Reference in a new issue