Make the template preview work

The template was displaying raw, eg ‘Hello ((name))’

This commit changes it to use the `.formatted_as_markup` property so the
template is rendered with:
- the placeholders as blue lozenges
- the service name prefixing the message
This commit is contained in:
Chris Hill-Scott
2016-03-02 13:17:24 +00:00
parent a9b9927115
commit 542f097b6d
2 changed files with 4 additions and 2 deletions

View File

@@ -19,7 +19,7 @@
<div class="grid-row">
<div class="column-two-thirds">
{{ sms_message(
template,
template.formatted_as_markup,
)}}
</div>
</div>

View File

@@ -41,4 +41,6 @@ def test_should_show_page_for_one_job(app_,
response = client.get(url_for('main.view_job', service_id=service_id, job_id=job_id))
assert response.status_code == 200
assert file_name in response.get_data(as_text=True)
content = response.get_data(as_text=True)
assert "Test Service: Your vehicle tax is about to expire" in content
assert file_name in content