mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Tidy up text on forgot your password screens
Display updated_at instead of created_at for notifications.
This commit is contained in:
committed by
Nicholas Staples
parent
9232ab51d5
commit
e3fa1ac253
@@ -8,7 +8,7 @@ def test_should_render_forgot_password(app_):
|
||||
with app_.test_request_context():
|
||||
response = app_.test_client().get(url_for('.forgot_password'))
|
||||
assert response.status_code == 200
|
||||
assert 'If you have forgotten your password, we can send you an email to create a new password.' \
|
||||
assert 'We’ll send you an email to create a new password.' \
|
||||
in response.get_data(as_text=True)
|
||||
|
||||
|
||||
@@ -22,9 +22,8 @@ def test_should_redirect_to_password_reset_sent_for_valid_email(
|
||||
url_for('.forgot_password'),
|
||||
data={'email_address': api_user_active.email_address})
|
||||
assert response.status_code == 200
|
||||
assert (
|
||||
'You have been sent an email containing a link'
|
||||
' to reset your password.') in response.get_data(as_text=True)
|
||||
assert 'We’ve sent you an email with a link to reset your password.' \
|
||||
in response.get_data(as_text=True)
|
||||
app.user_api_client.send_reset_password_url.assert_called_once_with(api_user_active.email_address)
|
||||
|
||||
|
||||
@@ -40,7 +39,6 @@ def test_should_redirect_to_password_reset_sent_for_missing_email(
|
||||
url_for('.forgot_password'),
|
||||
data={'email_address': api_user_active.email_address})
|
||||
assert response.status_code == 200
|
||||
assert (
|
||||
'You have been sent an email containing a link'
|
||||
' to reset your password.') in response.get_data(as_text=True)
|
||||
assert 'We’ve sent you an email with a link to reset your password.' \
|
||||
in response.get_data(as_text=True)
|
||||
app.user_api_client.send_reset_password_url.assert_called_once_with(api_user_active.email_address)
|
||||
|
||||
@@ -5,6 +5,7 @@ from app.utils import generate_notifications_csv
|
||||
from tests import notification_json, job_json_with_created_by
|
||||
from tests.conftest import fake_uuid
|
||||
from tests.conftest import mock_get_job as mock_get_job1
|
||||
from freezegun import freeze_time
|
||||
|
||||
|
||||
def test_should_return_list_of_all_jobs(app_,
|
||||
@@ -24,6 +25,7 @@ def test_should_return_list_of_all_jobs(app_,
|
||||
assert len(jobs) == 5
|
||||
|
||||
|
||||
@freeze_time("2016-01-01 11:09:00.061258")
|
||||
def test_should_show_page_for_one_job(
|
||||
app_,
|
||||
service_one,
|
||||
@@ -45,6 +47,7 @@ def test_should_show_page_for_one_job(
|
||||
content = response.get_data(as_text=True)
|
||||
assert "{}: Your vehicle tax is about to expire".format(service_one['name']) in content
|
||||
assert file_name in content
|
||||
assert "Sent at 11:10" in content
|
||||
|
||||
|
||||
def test_should_show_updates_for_one_job_as_json(
|
||||
|
||||
@@ -9,7 +9,7 @@ def test_render_sign_in_returns_sign_in_template(app_):
|
||||
assert 'Sign in' in response.get_data(as_text=True)
|
||||
assert 'Email address' in response.get_data(as_text=True)
|
||||
assert 'Password' in response.get_data(as_text=True)
|
||||
assert 'Forgotten password?' in response.get_data(as_text=True)
|
||||
assert 'Forgot your password?' in response.get_data(as_text=True)
|
||||
|
||||
|
||||
def test_logged_in_user_redirects_to_choose_service(app_,
|
||||
|
||||
Reference in New Issue
Block a user