2020-03-07 08:37:38 -06:00
|
|
|
"""Test journal views and helper methods."""
|
|
|
|
from incorporealcms.journal import journal_file_resolver
|
|
|
|
|
|
|
|
|
|
|
|
def test_journal_file_resolver_dir_to_index():
|
2020-03-07 09:45:00 -06:00
|
|
|
assert journal_file_resolver('/foo/') == '/foo/index.md'
|
2020-03-07 08:37:38 -06:00
|
|
|
|
|
|
|
|
|
|
|
def test_journal_file_resolver_subdir_to_index():
|
2020-03-07 09:45:00 -06:00
|
|
|
assert journal_file_resolver('/foo/bar/') == '/foo/bar/index.md'
|
2020-03-07 08:37:38 -06:00
|
|
|
|
|
|
|
|
|
|
|
def test_journal_file_resolver_other_requests_fine():
|
2020-03-07 09:45:00 -06:00
|
|
|
assert journal_file_resolver('/foo/baz') == '/foo/baz.md'
|