mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
More helpful error when signed in an accept invite
This commit is contained in:
@@ -284,7 +284,10 @@ def test_signed_in_existing_user_cannot_use_anothers_invite(app_,
|
||||
assert page.h1.string.strip() == '403'
|
||||
flash_banners = page.find_all('div', class_='banner-dangerous')
|
||||
assert len(flash_banners) == 1
|
||||
assert flash_banners[0].text.strip() == "You can't accept an invite for another person."
|
||||
banner_contents = flash_banners[0].text.strip()
|
||||
assert "You’re signed in as test@user.gov.uk." in banner_contents
|
||||
assert "This invite is for another email address." in banner_contents
|
||||
assert "<a href='/sign-out'>Sign out</a> and click the link again to accept this invite." in banner_contents
|
||||
assert mock_accept_invite.call_count == 0
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user