add page modified time to the template
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
"""Test page views and helper methods."""
|
||||
import re
|
||||
|
||||
from incorporealcms.pages import page_file_resolver
|
||||
|
||||
|
||||
@@ -36,3 +38,9 @@ def test_page_without_title_metadata(client):
|
||||
assert response.status_code == 200
|
||||
assert b'<title>incorporeal.org</title>' in response.data
|
||||
assert b'<h1>this page doesn\'t have a title!</h1>' in response.data
|
||||
|
||||
|
||||
def test_page_has_modified_timestamp(client):
|
||||
response = client.get('/')
|
||||
assert response.status_code == 200
|
||||
assert re.search(r'Last modified: ....-..-.. ..:..:.. ...', response.data.decode()) is not None
|
||||
|
||||
Reference in New Issue
Block a user