summaryrefslogtreecommitdiff
path: root/service/test/integration
diff options
context:
space:
mode:
authorBruno Wagner <bwagner@thoughtworks.com>2014-10-17 14:58:19 +0200
committerBruno Wagner <bwagner@thoughtworks.com>2014-10-17 15:03:56 +0200
commit70ecb8829f8161ede22fcb38274c6e57a9819b98 (patch)
tree4f2b773c7b036ee313597e39fab4f9f5a142db08 /service/test/integration
parent4844d927aeac67cc8a41dac77eea21dfb038c984 (diff)
#102 #113 Sorting through search, and ignoring duplicate results on searches
Diffstat (limited to 'service/test/integration')
-rw-r--r--service/test/integration/search_test.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/service/test/integration/search_test.py b/service/test/integration/search_test.py
index ac91f0b0..735f8b8d 100644
--- a/service/test/integration/search_test.py
+++ b/service/test/integration/search_test.py
@@ -108,3 +108,14 @@ class SearchTest(unittest.TestCase, SoledadTestBase):
for tag in tags_count:
if tag['name'] == mailbox:
return tag['counts']
+
+ def test_order_by_date(self):
+ input_mail = MailBuilder().with_date('2014-10-15T15:15').build_input_mail()
+ input_mail2 = MailBuilder().with_date('2014-10-15T15:14').build_input_mail()
+
+ self.add_mail_to_inbox(input_mail)
+ self.add_mail_to_inbox(input_mail2)
+
+ results = self.get_mails_by_tag('inbox')
+ self.assertEqual(results[0].ident, input_mail2.ident)
+ self.assertEqual(results[1].ident, input_mail.ident)