mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-25 18:02:40 -05:00
Merge pull request #1504 from alphagov/change-reply-to-address-for-invites
Change reply to address for invitation emails to be invitation sender
This commit is contained in:
@@ -42,7 +42,7 @@ def create_invited_user(service_id):
|
||||
notification_type=EMAIL_TYPE,
|
||||
api_key_id=None,
|
||||
key_type=KEY_TYPE_NORMAL,
|
||||
reply_to_text=service.get_default_reply_to_email_address()
|
||||
reply_to_text=invited_user.from_user.email_address
|
||||
)
|
||||
|
||||
send_notification_to_queue(saved_notification, False, queue=QueueNames.NOTIFY)
|
||||
|
||||
@@ -33,7 +33,7 @@ def test_create_invited_user(admin_request, sample_service, mocker, invitation_e
|
||||
assert json_resp['data']['id']
|
||||
|
||||
notification = Notification.query.first()
|
||||
assert notification.reply_to_text == "notify@gov.uk"
|
||||
assert notification.reply_to_text == invite_from.email_address
|
||||
mocked.assert_called_once_with([(str(notification.id))], queue="notify-internal-tasks")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user