mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 14:31:57 -05:00
- Remove password_changed_at from the update_dict in users_dao
- Format dates in UserSchema - Properly formatted subject and message body for the password reset email - Add name to the message for reset password
This commit is contained in:
@@ -514,6 +514,7 @@ def test_email_invited_user_should_send_email(notify_api, mocker):
|
||||
def test_email_reset_password_should_send_email(notify_api, mocker):
|
||||
with notify_api.test_request_context():
|
||||
reset_password_message = {'to': 'someone@it.gov.uk',
|
||||
'name': 'Some One',
|
||||
'reset_password_url': 'bah'}
|
||||
|
||||
mocker.patch('app.aws_ses_client.send_email')
|
||||
@@ -521,8 +522,9 @@ def test_email_reset_password_should_send_email(notify_api, mocker):
|
||||
|
||||
encrypted_message = encryption.encrypt(reset_password_message)
|
||||
email_reset_password(encrypted_message)
|
||||
|
||||
message = tasks.password_reset_message(reset_password_message['name'],
|
||||
reset_password_message['reset_password_url'])
|
||||
aws_ses_client.send_email(current_app.config['VERIFY_CODE_FROM_EMAIL_ADDRESS'],
|
||||
reset_password_message['to'],
|
||||
"Reset password for GOV.UK Notify",
|
||||
reset_password_message['reset_password_url'])
|
||||
message)
|
||||
|
||||
Reference in New Issue
Block a user