add method to convert .*/ paths to .*/index
This commit is contained in:
14
tests/test_journal.py
Normal file
14
tests/test_journal.py
Normal file
@@ -0,0 +1,14 @@
|
||||
"""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/') == '/foo/index'
|
||||
|
||||
|
||||
def test_journal_file_resolver_subdir_to_index():
|
||||
assert journal_file_resolver('/foo/bar/') == '/foo/bar/index'
|
||||
|
||||
|
||||
def test_journal_file_resolver_other_requests_fine():
|
||||
assert journal_file_resolver('/foo/baz') == '/foo/baz'
|
||||
Reference in New Issue
Block a user