mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 05:26:13 +02:00
Create folder if config ends with (back)slash (#1492)
* Check config if FolderJournal and treat as so * Add test for end of path is slash * Code format correction * Requested changes PR 1482 * Add info to doc about path of folder. * Small addition to doc about folder journal
This commit is contained in:
parent
1c35c6951d
commit
e758986985
5 changed files with 38 additions and 3 deletions
|
@ -210,6 +210,16 @@ def journal_should_not_exist(config_on_disk, should_or_should_not):
|
|||
)
|
||||
|
||||
|
||||
@then(parse('the journal "{journal_name}" directory {should_or_should_not} exist'))
|
||||
def directory_should_not_exist(config_on_disk, should_or_should_not, journal_name):
|
||||
scoped_config = scope_config(config_on_disk, journal_name)
|
||||
expected_path = scoped_config["journal"]
|
||||
we_should = parse_should_or_should_not(should_or_should_not)
|
||||
dir_exists = os.path.isdir(expected_path)
|
||||
|
||||
assert dir_exists == we_should
|
||||
|
||||
|
||||
@then(parse('the content of file "{file_path}" in the cache should be\n{file_content}'))
|
||||
def content_of_file_should_be(file_path, file_content, cache_dir):
|
||||
assert cache_dir["exists"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue