mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 17:01:35 -05:00
If template has a default address use that address ELSE the address is blank.
This commit is contained in:
@@ -993,8 +993,8 @@ def test_save_sms_does_not_send_duplicate_and_does_not_put_in_retry_queue(sample
|
||||
|
||||
def test_save_letter_saves_letter_to_database(mocker, notify_db_session):
|
||||
service = create_service()
|
||||
create_letter_contact(service=service, contact_block="Address contact", is_default=True)
|
||||
template = create_template(service=service, template_type=LETTER_TYPE)
|
||||
contact_block = create_letter_contact(service=service, contact_block="Address contact", is_default=True)
|
||||
template = create_template(service=service, template_type=LETTER_TYPE, reply_to=contact_block.id)
|
||||
job = create_job(template=template)
|
||||
|
||||
mocker.patch('app.celery.tasks.create_random_identifier', return_value="this-is-random-in-real-life")
|
||||
@@ -1037,7 +1037,7 @@ def test_save_letter_saves_letter_to_database(mocker, notify_db_session):
|
||||
assert notification_db.sent_by is None
|
||||
assert notification_db.personalisation == personalisation
|
||||
assert notification_db.reference == "this-is-random-in-real-life"
|
||||
assert notification_db.reply_to_text == "Address contact"
|
||||
assert notification_db.reply_to_text == contact_block.contact_block
|
||||
|
||||
|
||||
def test_save_letter_uses_template_reply_to_text(mocker, notify_db_session):
|
||||
|
||||
Reference in New Issue
Block a user