diff options
author | Alexandre Pretto Nunes <anunes@thoughtworks.com> | 2014-09-04 19:28:39 -0300 |
---|---|---|
committer | Alexandre Pretto Nunes <anunes@thoughtworks.com> | 2014-09-04 19:29:48 -0300 |
commit | aa40c93c625baecbef79168c2cffd683be1ff8f3 (patch) | |
tree | 9eab0a47534c932cd30bf3b2c0bd54f61e985511 /service/test/adapter | |
parent | 8f38ab0b6e859358a9d6ddf92467a6dfd7b9fad9 (diff) |
Implement mark_as_read for emails
Diffstat (limited to 'service/test/adapter')
-rw-r--r-- | service/test/adapter/mail_service_test.py | 7 | ||||
-rw-r--r-- | service/test/adapter/pixelated_mail_test.py | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/service/test/adapter/mail_service_test.py b/service/test/adapter/mail_service_test.py index bd45c4bf..b6082b45 100644 --- a/service/test/adapter/mail_service_test.py +++ b/service/test/adapter/mail_service_test.py @@ -40,3 +40,10 @@ class TestMailService(unittest.TestCase): self.mail_service.send(mail) verify(self.mail_sender).sendmail(mail) + + def test_mark_as_read(self): + mail = mock() + when(self.mail_service).mail(any()).thenReturn(mail) + self.mail_service.mark_as_read(1) + + verify(mail).mark_as_read() diff --git a/service/test/adapter/pixelated_mail_test.py b/service/test/adapter/pixelated_mail_test.py index 77f9738f..2e62bc41 100644 --- a/service/test/adapter/pixelated_mail_test.py +++ b/service/test/adapter/pixelated_mail_test.py @@ -102,8 +102,9 @@ class TestPixelatedMail(unittest.TestCase): self.assertEquals(pixelated_mail.headers['bcc'], ["nlima@example.com", "ddornelles@example.com" ]) self.assertEquals(pixelated_mail.headers['cc'], ["nlima@example.com", "ddornelles@example.com" ]) + def test_mark_as_read(self): + mail = PixelatedMail.from_dict(self.mail_dict) + mail.mark_as_read() - - - + self.assertIn("read", mail.status) |