Merge pull request #3815 from alphagov/permissions-bug

allow caseworkers to view letter previews
This commit is contained in:
Leo Hemsted
2021-02-23 16:57:34 +00:00
committed by GitHub
2 changed files with 8 additions and 1 deletions

View File

@@ -610,12 +610,19 @@ def test_notification_page_shows_page_for_other_postage_classes(
@pytest.mark.parametrize('filetype', [
'pdf', 'png'
])
@pytest.mark.parametrize('user', [
create_active_user_with_permissions(),
create_active_caseworking_user(),
])
def test_should_show_image_of_letter_notification(
logged_in_client,
fake_uuid,
mocker,
filetype,
user,
):
mocker.patch('app.user_api_client.get_user', return_value=user)
notification = create_notification(template_type='letter')
mocker.patch('app.notification_api_client.get_notification', return_value=notification)