mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-09 10:09:49 -04:00
add reply-to-text to send notification to service users
This commit is contained in:
@@ -23,7 +23,8 @@ def send_notification_to_service_users(service_id, template_id, personalisation=
|
|||||||
personalisation=personalisation,
|
personalisation=personalisation,
|
||||||
notification_type=template.template_type,
|
notification_type=template.template_type,
|
||||||
api_key_id=None,
|
api_key_id=None,
|
||||||
key_type=KEY_TYPE_NORMAL
|
key_type=KEY_TYPE_NORMAL,
|
||||||
|
reply_to_text=notify_service.get_default_reply_to_email_address()
|
||||||
)
|
)
|
||||||
send_notification_to_queue(notification, False, queue=QueueNames.NOTIFY)
|
send_notification_to_queue(notification, False, queue=QueueNames.NOTIFY)
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ def test_send_notification_to_service_users_persists_notifications_correctly(
|
|||||||
):
|
):
|
||||||
mocker.patch('app.service.sender.send_notification_to_queue')
|
mocker.patch('app.service.sender.send_notification_to_queue')
|
||||||
|
|
||||||
create_notify_service(notify_db, notify_db_session)
|
notify_service, user = create_notify_service(notify_db, notify_db_session)
|
||||||
service = create_sample_service(notify_db, notify_db_session, user=sample_user)
|
service = create_sample_service(notify_db, notify_db_session, user=sample_user)
|
||||||
template = create_template(service, template_type=notification_type)
|
template = create_template(service, template_type=notification_type)
|
||||||
send_notification_to_service_users(service_id=service.id, template_id=template.id)
|
send_notification_to_service_users(service_id=service.id, template_id=template.id)
|
||||||
@@ -40,6 +40,7 @@ def test_send_notification_to_service_users_persists_notifications_correctly(
|
|||||||
assert notification.template.id == template.id
|
assert notification.template.id == template.id
|
||||||
assert notification.template.template_type == notification_type
|
assert notification.template.template_type == notification_type
|
||||||
assert notification.notification_type == notification_type
|
assert notification.notification_type == notification_type
|
||||||
|
assert notification.reply_to_text == notify_service.get_default_reply_to_email_address()
|
||||||
|
|
||||||
|
|
||||||
def test_send_notification_to_service_users_sends_to_queue(
|
def test_send_notification_to_service_users_sends_to_queue(
|
||||||
|
|||||||
Reference in New Issue
Block a user