summaryrefslogtreecommitdiff
path: root/service/test/integration/mark_as_read_unread_test.py
diff options
context:
space:
mode:
authorLisa Junger <ljunger@thoughtworks.com>2014-10-14 14:29:36 +0200
committerLisa Junger <ljunger@thoughtworks.com>2014-10-14 14:33:45 +0200
commit23503fcdf83fe1437bcd164c79d75cf56c08bade (patch)
tree8b01995d7ba8b23d876139f5780b00931fdbde9e /service/test/integration/mark_as_read_unread_test.py
parent9446c8df4627b8f5955def0fd86c9bf1924255fe (diff)
Issue #12 - Bulk mark as unread
Diffstat (limited to 'service/test/integration/mark_as_read_unread_test.py')
-rw-r--r--service/test/integration/mark_as_read_unread_test.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/service/test/integration/mark_as_read_unread_test.py b/service/test/integration/mark_as_read_unread_test.py
index a75e8c92..cdac78d5 100644
--- a/service/test/integration/mark_as_read_unread_test.py
+++ b/service/test/integration/mark_as_read_unread_test.py
@@ -30,21 +30,33 @@ class MarkAsReadTest(unittest.TestCase, SoledadTestBase):
self.add_mail_to_inbox(input_mail)
mails = self.get_mails_by_tag('inbox')
- self.assertFalse('read' in mails[0].status)
+ self.assertNotIn('read', mails[0].status)
self.mark_as_read(input_mail.ident)
mails = self.get_mails_by_tag('inbox')
- self.assertTrue('read' in mails[0].status)
+ self.assertIn('read', mails[0].status)
def test_mark_single_as_unread(self):
input_mail = MailBuilder().with_status('read').build_input_mail()
+
self.add_mail_to_inbox(input_mail)
+ self.mark_as_unread(input_mail.ident)
+
mails = self.get_mails_by_tag('inbox')
- self.assertIn('read', mails[0].status)
+ self.assertNotIn('read', mails[0].status)
- self.mark_as_unread(input_mail.ident)
+ def test_mark_many_mails_as_unread(self):
+ input_mail = MailBuilder().with_status('read').build_input_mail()
+ input_mail2 = MailBuilder().with_status('read').build_input_mail()
+
+ self.add_mail_to_inbox(input_mail)
+ self.add_mail_to_inbox(input_mail2)
+
+ self.mark_many_as_unread([input_mail.ident, input_mail2.ident])
mails = self.get_mails_by_tag('inbox')
+
self.assertNotIn('read', mails[0].status)
+ self.assertNotIn('read', mails[1].status)