Change how link is referenced in user profile test

Co-Authored-By: Katie Smith <klssmith@users.noreply.github.com>
This commit is contained in:
Tom Byers
2020-02-21 14:05:34 +00:00
committed by GitHub
parent 1513cfa9e6
commit fa03b786dc

View File

@@ -263,7 +263,7 @@ def test_non_gov_user_cannot_see_change_email_link(
):
client_request.login(api_nongov_user_active)
page = client_request.get('main.user_profile')
assert '<a class="govuk-link govuk-link--no-visited-state" href="/user-profile/email">' not in str(page)
assert not page.find('a', {'href': url_for('main.user_profile_email')})
assert page.select_one('h1').text.strip() == 'Your profile'