mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
- is_default is required on the add_service_email_reply_to_request schema
- Added check that the service exists for the POST reply-to methods. - Added tests
This commit is contained in:
@@ -138,6 +138,15 @@ def test_add_reply_to_email_address_ensures_first_reply_to_is_default(sample_ser
|
||||
email_address="first@address.com", is_default=False)
|
||||
|
||||
|
||||
def test_add_reply_to_email_address_ensure_there_is_not_more_than_one_default(sample_service):
|
||||
create_reply_to_email(service=sample_service, email_address='first@email.com', is_default=True)
|
||||
create_reply_to_email(service=sample_service, email_address='second@email.com', is_default=True)
|
||||
with pytest.raises(Exception):
|
||||
add_reply_to_email_address_for_service(service_id=sample_service.id,
|
||||
email_address='third_email@address.com',
|
||||
is_default=False)
|
||||
|
||||
|
||||
def test_update_reply_to_email_address(sample_service):
|
||||
first_reply_to = create_reply_to_email(service=sample_service, email_address="first@address.com")
|
||||
update_reply_to_email_address(service_id=sample_service.id, reply_to_id=first_reply_to.id,
|
||||
|
||||
Reference in New Issue
Block a user