mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 05:26:13 +02:00
Implement tag tests in JSON
Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
This commit is contained in:
parent
3cc3e387c5
commit
48c9d9fa16
2 changed files with 25 additions and 13 deletions
|
@ -6,11 +6,13 @@ Feature: Custom formats
|
|||
When we run "jrnl --format json"
|
||||
Then we should get no error
|
||||
And the output should be valid JSON
|
||||
And "entries" in the json output should have 3 elements
|
||||
And "tags" in the json output should contain "@ipsum"
|
||||
And "tags" in the json output should contain "@tagone"
|
||||
And "tags" in the json output should contain "@tagthree"
|
||||
And "tags" in the json output should contain "@tagtwo"
|
||||
Given we parse the output as JSON
|
||||
Then "entries" node in the parsed output should have 3 elements
|
||||
And "tags" in the parsed output should be
|
||||
@ipsum
|
||||
@tagone
|
||||
@tagtwo
|
||||
@tagthree
|
||||
And entry 1 should have an array "tags" with 3 elements
|
||||
And entry 2 should have an array "tags" with 1 elements
|
||||
And entry 3 should have an array "tags" with 2 elements
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue