summaryrefslogtreecommitdiff
path: root/service/test/unit
diff options
context:
space:
mode:
authorChristoph <c@kluenter.de>2016-05-31 16:31:41 +0200
committerChristoph <c@kluenter.de>2016-05-31 16:31:41 +0200
commitff292f5127d5c90e5d982e11c20df52c6444e0ae (patch)
tree3254d932e08d99bce7b058e917266db8be2d0d33 /service/test/unit
parent3422846b2ef9677db857e3adde312b7fbbd4b068 (diff)
parentdd39512b7ca617c9cd3c2e29c8e3ec068631b9e8 (diff)
Merge pull request #701 from shabbyrobe/fix-issue-695
Issue 695: Show all recipients in mail sent folder
Diffstat (limited to 'service/test/unit')
-rw-r--r--service/test/unit/adapter/services/test_mail_sender.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/service/test/unit/adapter/services/test_mail_sender.py b/service/test/unit/adapter/services/test_mail_sender.py
index 0f02f759..863ac81a 100644
--- a/service/test/unit/adapter/services/test_mail_sender.py
+++ b/service/test/unit/adapter/services/test_mail_sender.py
@@ -77,6 +77,20 @@ class MailSenderTest(unittest.TestCase):
verify(OutgoingMail).send_message(any(), TwistedSmtpUserCapture(recipient))
@defer.inlineCallbacks
+ def test_send_leaves_mail_in_tact(self):
+ input_mail_dict = mail_dict()
+ input_mail = InputMail.from_dict(input_mail_dict, from_address='pixelated@org')
+
+ when(OutgoingMail).send_message(any(), any()).thenReturn(defer.succeed(None))
+
+ yield self.sender.sendmail(input_mail)
+
+ self.assertEqual(input_mail.to, input_mail_dict["header"]["to"])
+ self.assertEqual(input_mail.cc, input_mail_dict["header"]["cc"])
+ self.assertEqual(input_mail.bcc, input_mail_dict["header"]["bcc"])
+ self.assertEqual(input_mail.subject, input_mail_dict["header"]["subject"])
+
+ @defer.inlineCallbacks
def test_problem_with_email_raises_exception(self):
input_mail = InputMail.from_dict(mail_dict(), from_address='pixelated@org')