mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
Better flash message for users with active accounts who click on
verification link again.
This commit is contained in:
@@ -61,7 +61,7 @@ def verify_email(token):
|
||||
abort(404)
|
||||
|
||||
if user.is_active():
|
||||
flash("You have already verified your email address.")
|
||||
flash("That verification link has expired.")
|
||||
return redirect(url_for('main.sign_in'))
|
||||
|
||||
session['user_details'] = {"email": user.email_address, "id": user.id}
|
||||
|
||||
@@ -146,4 +146,4 @@ def test_verify_email_redirects_to_sign_in_if_user_active(app_,
|
||||
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
|
||||
assert page.h1.text == 'Sign in'
|
||||
flash_banner = page.find('div', class_='banner-dangerous').string.strip()
|
||||
assert flash_banner == "You have already verified your email address."
|
||||
assert flash_banner == "That verification link has expired."
|
||||
|
||||
Reference in New Issue
Block a user