allow pages to specify different templates
This commit is contained in:
@@ -193,3 +193,13 @@ def test_setting_selected_style_includes_cookie(client):
|
||||
assert b'dark.css' in response.data
|
||||
assert b'light.css' not in response.data
|
||||
assert style_cookie.value == 'dark'
|
||||
|
||||
|
||||
def test_pages_can_supply_alternate_templates(client):
|
||||
"""Test that pages can supply templates other than the default."""
|
||||
response = client.get('/')
|
||||
assert b'class="site-wrap"' in response.data
|
||||
assert b'class="wide-site-wrap"' not in response.data
|
||||
response = client.get('/custom-template')
|
||||
assert b'class="site-wrap"' not in response.data
|
||||
assert b'class="wide-site-wrap"' in response.data
|
||||
|
||||
3
tests/instance/pages/custom-template.md
Normal file
3
tests/instance/pages/custom-template.md
Normal file
@@ -0,0 +1,3 @@
|
||||
Template: base-wide.html
|
||||
|
||||
testttttttttt
|
||||
Reference in New Issue
Block a user