Add test for SVG fallback image path

It's the only resource that uses the `asset_path`
template variable in `template.njk` so this checks
that works as expected.

From feedback on the associated pull request:

https://github.com/alphagov/notifications-admin/pull/3241#issuecomment-571102394
This commit is contained in:
Tom Byers
2020-01-06 11:40:12 +00:00
parent b822914e23
commit 6726ad31b9

View File

@@ -177,6 +177,15 @@ def test_css_is_served_from_correct_path(client_request):
][index])
def test_resources_that_use_asset_path_variable_have_correct_path(client_request):
page = client_request.get('main.documentation') # easy static page
logo_svg_fallback = page.select_one('.govuk-header__logotype-crown-fallback-image')
assert logo_svg_fallback['src'].startswith('https://static.example.com/images/govuk-logotype-crown.png')
@pytest.mark.parametrize('extra_args, email_branding_retrieved', (
(
{},