15 lines
469 B
Python
15 lines
469 B
Python
"""Test journal views and helper methods."""
|
|
from incorporealcms.journal import journal_file_resolver
|
|
|
|
|
|
def test_journal_file_resolver_dir_to_index():
|
|
assert journal_file_resolver('foo/') == 'journal/foo/index.md'
|
|
|
|
|
|
def test_journal_file_resolver_subdir_to_index():
|
|
assert journal_file_resolver('foo/bar/') == 'journal/foo/bar/index.md'
|
|
|
|
|
|
def test_journal_file_resolver_other_requests_fine():
|
|
assert journal_file_resolver('foo/baz') == 'journal/foo/baz.md'
|