mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 11:38:32 +02:00
Corrected BDD tests
This commit is contained in:
parent
15dcfcc06d
commit
fdc31798fc
3 changed files with 18 additions and 4 deletions
|
@ -164,7 +164,9 @@ def load_config(config_path):
|
||||||
if duplicate_keys:
|
if duplicate_keys:
|
||||||
print_msg(
|
print_msg(
|
||||||
Message(
|
Message(
|
||||||
MsgText.ConfigDoubleKeys, MsgStyle.WARNING, {"duplicate_keys": duplicate_keys}
|
MsgText.ConfigDoubleKeys,
|
||||||
|
MsgStyle.WARNING,
|
||||||
|
{"duplicate_keys": duplicate_keys},
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,19 @@ Feature: Multiple journals
|
||||||
When we run "jrnl --cf empty_file.yaml"
|
When we run "jrnl --cf empty_file.yaml"
|
||||||
Then the error output should contain "Unable to parse config file"
|
Then the error output should contain "Unable to parse config file"
|
||||||
|
|
||||||
Scenario: Show a warning message when the config file contains double keys at the same level
|
Scenario: Show a warning message when the config file contains duplicate keys at the same level
|
||||||
Given we use the config "double_keys.yaml"
|
Given the config "duplicate_keys.yaml" exists
|
||||||
|
And we use the config "duplicate_keys.yaml"
|
||||||
When we run "jrnl -1"
|
When we run "jrnl -1"
|
||||||
Then the output should contain "One or more keys appear multiple times at the same level"
|
Then the output should contain "One or more keys appear multiple times at the same level"
|
||||||
|
|
||||||
|
Scenario: Show a warning message when using --config-file with duplicate keys
|
||||||
|
Given the config "duplicate_keys.yaml" exists
|
||||||
|
And we use the config "multiple.yaml"
|
||||||
|
When we run "jrnl --cf duplicate_keys.yaml -1"
|
||||||
|
Then the output should contain "One or more keys appear multiple times at the same level"
|
||||||
|
|
||||||
|
Scenario: Don't show a duplicate keys warning message when using --config-override on an existing value
|
||||||
|
Given we use the config "multiple.yaml"
|
||||||
|
When we run "jrnl --config-override highlight false"
|
||||||
|
Then the output should not contain "One or more keys appear multiple times at the same level"
|
Loading…
Add table
Reference in a new issue