mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-17 04:59:37 -04:00
Show all letter pages on the notification page
Sometimes a long placeholder can push stuff onto a new page, so we need to take the personalisation into account when counting pages.
This commit is contained in:
@@ -142,7 +142,7 @@ def test_notification_page_shows_page_for_letter_notification(
|
||||
count_of_pages = 3
|
||||
|
||||
mock_get_notification(mocker, fake_uuid, template_type='letter', postage='second')
|
||||
mocker.patch(
|
||||
mock_page_count = mocker.patch(
|
||||
'app.main.views.notifications.get_page_count_for_letter',
|
||||
return_value=count_of_pages
|
||||
)
|
||||
@@ -173,6 +173,10 @@ def test_notification_page_shows_page_for_letter_notification(
|
||||
'.png?page={}'.format(index)
|
||||
)
|
||||
|
||||
assert len(mock_page_count.call_args_list) == 1
|
||||
assert mock_page_count.call_args_list[0][0][0]['name'] == 'sample template'
|
||||
assert mock_page_count.call_args_list[0][1]['values'] == {'name': 'Jo'}
|
||||
|
||||
|
||||
@pytest.mark.parametrize('notification_status, expected_message', (
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user