mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 21:18:32 +02:00
move tests to be more behavior driven
This commit is contained in:
parent
80bc2ae4ae
commit
d1692ab771
3 changed files with 33 additions and 34 deletions
|
@ -1,34 +0,0 @@
|
|||
Feature: Tests that don't fit anywhere else
|
||||
|
||||
Scenario: Opening an folder that's not a DayOne folder should treat as folder journal
|
||||
Given we use the config "empty_folder.yaml"
|
||||
When we run "jrnl 23 july 2013: Testing folder journal."
|
||||
Then we should see the message "Entry added"
|
||||
When we run "jrnl -1"
|
||||
Then the output should be "2013-07-23 09:00 Testing folder journal."
|
||||
|
||||
Scenario: Loading a sample journal
|
||||
Given we use the config "basic.yaml"
|
||||
When we run "jrnl -2"
|
||||
Then we should get no error
|
||||
And 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.
|
||||
"""
|
||||
|
||||
Scenario: Loading a DayOne Journal
|
||||
Given we use the config "dayone.yaml"
|
||||
When we run "jrnl -from 'feb 2013'"
|
||||
Then we should get no error
|
||||
And the output should be
|
||||
"""
|
||||
2013-05-17 11:39 This entry has tags!
|
||||
|
||||
2013-06-17 20:38 This entry has a location.
|
||||
|
||||
2013-07-17 11:38 This entry is starred!
|
||||
"""
|
|
@ -91,3 +91,29 @@ Feature: Searching in a journal
|
|||
Given we use the config "dayone.yaml"
|
||||
When we run "jrnl @plAy"
|
||||
Then the output should contain "2013-05-17 11:39 This entry has tags!"
|
||||
|
||||
Scenario: Loading a sample journal
|
||||
Given we use the config "basic.yaml"
|
||||
When we run "jrnl -2"
|
||||
Then we should get no error
|
||||
And 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.
|
||||
"""
|
||||
|
||||
Scenario: Loading a DayOne Journal
|
||||
Given we use the config "dayone.yaml"
|
||||
When we run "jrnl -from 'feb 2013'"
|
||||
Then we should get no error
|
||||
And the output should be
|
||||
"""
|
||||
2013-05-17 11:39 This entry has tags!
|
||||
|
||||
2013-06-17 20:38 This entry has a location.
|
||||
|
||||
2013-07-17 11:38 This entry is starred!
|
||||
"""
|
||||
|
|
|
@ -100,3 +100,10 @@ Feature: Writing new entries.
|
|||
2014-04-24 09:00 Ran 6.2 miles today in 1:02:03.
|
||||
| I'm feeling sore because I forgot to stretch.
|
||||
"""
|
||||
|
||||
Scenario: Opening an folder that's not a DayOne folder should treat as folder journal
|
||||
Given we use the config "empty_folder.yaml"
|
||||
When we run "jrnl 23 july 2013: Testing folder journal."
|
||||
Then we should see the message "Entry added"
|
||||
When we run "jrnl -1"
|
||||
Then the output should be "2013-07-23 09:00 Testing folder journal."
|
||||
|
|
Loading…
Add table
Reference in a new issue