mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 15:19:49 -04:00
Merge pull request #3418 from alphagov/fix-letter-branding-preview
Fix letter branding preview
This commit is contained in:
@@ -248,7 +248,8 @@ def letter_branding_preview_image(filename):
|
|||||||
'The point of using Lorem Ipsum is that it has a more-or-less '
|
'The point of using Lorem Ipsum is that it has a more-or-less '
|
||||||
'normal distribution of letters, as opposed to using ‘Content '
|
'normal distribution of letters, as opposed to using ‘Content '
|
||||||
'here, content here’, making it look like readable English.'
|
'here, content here’, making it look like readable English.'
|
||||||
)
|
),
|
||||||
|
'template_type': 'letter',
|
||||||
}
|
}
|
||||||
filename = None if filename == 'no-branding' else filename
|
filename = None if filename == 'no-branding' else filename
|
||||||
|
|
||||||
|
|||||||
@@ -845,7 +845,14 @@ def test_letter_branding_preview_image(
|
|||||||
url_for('no_cookie.letter_branding_preview_image', filename=original_filename)
|
url_for('no_cookie.letter_branding_preview_image', filename=original_filename)
|
||||||
)
|
)
|
||||||
|
|
||||||
mocked_preview.assert_called_with(ANY, new_filename)
|
mocked_preview.assert_called_with(
|
||||||
|
{
|
||||||
|
'subject': 'An example letter',
|
||||||
|
'content': ANY,
|
||||||
|
'template_type': 'letter',
|
||||||
|
},
|
||||||
|
new_filename,
|
||||||
|
)
|
||||||
assert resp.get_data(as_text=True) == 'foo'
|
assert resp.get_data(as_text=True) == 'foo'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user