mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-18 18:39:21 +02:00
Add a test case for sending to multiple emails
This commit is contained in:
parent
a7804b35ea
commit
0e4ba770bf
1 changed files with 20 additions and 0 deletions
|
@ -281,3 +281,23 @@ class TestLogins(TestCase):
|
|||
# should only be one domain we send email for
|
||||
self.assertIn("Found 1 transition domains", output)
|
||||
self.assertTrue("would send email to testuser@gmail.com", output)
|
||||
|
||||
def test_send_domain_invitations_two_emails(self):
|
||||
"""Can send only a single domain invitation email."""
|
||||
with less_console_noise():
|
||||
self.run_load_domains()
|
||||
self.run_transfer_domains()
|
||||
|
||||
# these are two email addresses in data/test_contacts.txt
|
||||
output_stream = StringIO()
|
||||
# also have to re-point the logging handlers to output_stream
|
||||
with less_console_noise(output_stream):
|
||||
call_command("send_domain_invitations", "testuser@gmail.com",
|
||||
"agustina.wyman7@test.com", stdout=output_stream)
|
||||
|
||||
# Check that we had the right numbers in our output
|
||||
output = output_stream.getvalue()
|
||||
# should only be one domain we send email for
|
||||
self.assertIn("Found 2 transition domains", output)
|
||||
self.assertTrue("would send email to testuser@gmail.com", output)
|
||||
self.assertTrue("would send email to agustina.wyman7@test.com", output)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue