mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 13:08:31 +02:00
* Add brew and gitter badges to README * Update changelog [ci skip] * Make journal selection behavior more consistent when there's a colon with no date (#1164) * Bump pytest from 6.2.1 to 6.2.2 (#1167) Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.1 to 6.2.2. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/6.2.1...6.2.2) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump keyring from 21.8.0 to 22.0.1 (#1168) Bumps [keyring](https://github.com/jaraco/keyring) from 21.8.0 to 22.0.1. - [Release notes](https://github.com/jaraco/keyring/releases) - [Changelog](https://github.com/jaraco/keyring/blob/main/CHANGES.rst) - [Commits](https://github.com/jaraco/keyring/compare/v21.8.0...v22.0.1) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update changelog [ci skip] Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com> Co-authored-by: Jrnl Bot <jrnl.bot@gmail.com> Co-authored-by: Jonathan Wren <jonathan@nowandwren.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
65 lines
2.8 KiB
Gherkin
65 lines
2.8 KiB
Gherkin
Feature: Multiple journals
|
|
|
|
Scenario: Loading a config with two journals
|
|
Given we use the config "multiple.yaml"
|
|
Then journal "default" should have 2 entries
|
|
And journal "work" should have 0 entries
|
|
|
|
Scenario: Write to default config by default
|
|
Given we use the config "multiple.yaml"
|
|
When we run "jrnl this goes to default"
|
|
Then journal "default" should have 3 entries
|
|
And journal "work" should have 0 entries
|
|
|
|
Scenario: Write to specified journal
|
|
Given we use the config "multiple.yaml"
|
|
When we run "jrnl work a long day in the office"
|
|
Then journal "default" should have 2 entries
|
|
And journal "work" should have 1 entry
|
|
|
|
Scenario: Tell user which journal was used
|
|
Given we use the config "multiple.yaml"
|
|
When we run "jrnl work a long day in the office"
|
|
Then we should see the message "Entry added to work journal"
|
|
|
|
Scenario: Write to specified journal with a timestamp
|
|
Given we use the config "multiple.yaml"
|
|
When we run "jrnl work 23 july 2012: a long day in the office"
|
|
Then journal "default" should have 2 entries
|
|
And journal "work" should have 1 entry
|
|
And journal "work" should contain "2012-07-23"
|
|
|
|
Scenario: Write to specified journal without a timestamp but with colon
|
|
Given we use the config "multiple.yaml"
|
|
When we run "jrnl work : a long day in the office"
|
|
Then journal "default" should have 2 entries
|
|
And journal "work" should have 1 entry
|
|
And journal "work" should contain "a long day in the office"
|
|
|
|
Scenario: Write to specified journal without a timestamp but with colon
|
|
Given we use the config "multiple.yaml"
|
|
When we run "jrnl work: a long day in the office"
|
|
Then journal "default" should have 2 entries
|
|
And journal "work" should have 1 entry
|
|
And journal "work" should contain "a long day in the office"
|
|
|
|
Scenario: Create new journals as required
|
|
Given we use the config "multiple.yaml"
|
|
Then journal "ideas" should not exist
|
|
When we run "jrnl ideas 23 july 2012: sell my junk on ebay and make lots of money"
|
|
Then journal "ideas" should have 1 entry
|
|
|
|
Scenario: Don't crash if no default journal is specified
|
|
Given we use the config "bug343.yaml"
|
|
When we run "jrnl a long day in the office"
|
|
Then we should see the message "No default journal configured"
|
|
|
|
Scenario: Don't crash if no file exists for a configured encrypted journal
|
|
Given we use the config "multiple.yaml"
|
|
When we run "jrnl new_encrypted Adding first entry" and enter
|
|
"""
|
|
these three eyes
|
|
these three eyes
|
|
n
|
|
"""
|
|
Then we should see the message "Encrypted journal 'new_encrypted' created"
|