journal: render markdown content + title metadata
this has a really basic template and whatnot at the moment, so styling/etc isn't done, but this is maybe the last major piece before I could actually see pushing this onto the site
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
Title: Index
|
||||
|
||||
# test index
|
||||
|
||||
this is some test content
|
||||
|
||||
1
tests/instance/journal/no-title.md
Normal file
1
tests/instance/journal/no-title.md
Normal file
@@ -0,0 +1 @@
|
||||
# this page doesn't have a title!
|
||||
@@ -17,8 +17,22 @@ def test_journal_file_resolver_other_requests_fine():
|
||||
def test_journal_file_that_exists(client):
|
||||
response = client.get('/')
|
||||
assert response.status_code == 200
|
||||
assert b'<h1>test index</h1>' in response.data
|
||||
|
||||
|
||||
def test_journal_file_that_doesnt_exist(client):
|
||||
response = client.get('/ohuesthaoeusth')
|
||||
assert response.status_code == 404
|
||||
|
||||
|
||||
def test_journal_file_with_title_metadata(client):
|
||||
response = client.get('/')
|
||||
assert response.status_code == 200
|
||||
assert b'<title>Index - incorporeal.org</title>' in response.data
|
||||
|
||||
|
||||
def test_journal_file_without_title_metadata(client):
|
||||
response = client.get('/no-title')
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user