mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 02:42:26 -05:00
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:
@@ -19,7 +19,7 @@
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
{{ sms_message(
|
||||
template,
|
||||
template.formatted_as_markup,
|
||||
)}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user