mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Stop email preview showing brand name
This is a leftover from when email brands didn't have a 'text' field. It also adds some tests to check the brand name is displaying correctly.
This commit is contained in:
@@ -2485,6 +2485,25 @@ def mock_get_email_branding(mocker, fake_uuid):
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_email_branding_without_brand_text(mocker, fake_uuid):
|
||||
def _get_email_branding_without_brand_text(id):
|
||||
return {
|
||||
'email_branding': {
|
||||
'logo': 'example.png',
|
||||
'name': 'Organisation name',
|
||||
'text': '',
|
||||
'id': fake_uuid,
|
||||
'colour': '#f00'
|
||||
}
|
||||
}
|
||||
|
||||
return mocker.patch(
|
||||
'app.email_branding_client.get_email_branding',
|
||||
side_effect=_get_email_branding_without_brand_text
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_create_email_branding(mocker):
|
||||
def _create_email_branding(logo, name, text, colour):
|
||||
|
||||
Reference in New Issue
Block a user