Tests for fixing errors automatically

This commit is contained in:
Manuel Ebert 2013-11-03 14:38:41 -10:00
parent 6a81b18544
commit cabbbea694
2 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,15 @@
{
"default_hour": 9,
"timeformat": "%Y-%m-%d %H:%M",
"linewrap": 80,
"encrypt": false,
"editor": "",
"default_minute": 0,
"highlight": true
"password": "",
"journals": {
"default": "features/journals/simple.journal"
"work": "features/journals/work.journal",
},
"tagsymbols": "@"
}

14
features/fix_json.feature Normal file
View file

@ -0,0 +1,14 @@
Feature: Fixing broken config files
Scenario: Loading a file with journal
Given we use the config "broken.json"
When we run "jrnl -n 2"
Then we should see the message "Some errors in your jrnl config have been fixed for you."
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.
"""