summaryrefslogtreecommitdiffstats
path: root/group_messaging
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-10-11 13:28:59 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-10-11 13:28:59 -0400
commitaab96a57791a4a0b0181313f4af7d19cc5c4e75a (patch)
treeb823071b15bd25a1c6fcf56e0aebd001af26c60f /group_messaging
parentfdff1f8800b79c05fbbe49c3ed65c37033c074e7 (diff)
downloadaskbot-aab96a57791a4a0b0181313f4af7d19cc5c4e75a.tar.gz
askbot-aab96a57791a4a0b0181313f4af7d19cc5c4e75a.tar.bz2
askbot-aab96a57791a4a0b0181313f4af7d19cc5c4e75a.zip
added one more test case for the "thread is auto-visited by sender"
Diffstat (limited to 'group_messaging')
-rw-r--r--group_messaging/tests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/group_messaging/tests.py b/group_messaging/tests.py
index c77f29d7..bcf764db 100644
--- a/group_messaging/tests.py
+++ b/group_messaging/tests.py
@@ -172,6 +172,16 @@ class ViewsTests(GroupMessagingTests):
thread_lists = dom.find_all('table', attrs={'class': 'threads-list'})
self.assertEquals(len(thread_lists), 0)
+ def test_sent_thread_is_visited_by_sender(self):
+ root = self.create_thread_for_user(self.sender, self.recipient)
+ context = self.get_view_context(
+ ThreadsList,
+ data={'sender_id': str(self.sender.id)},
+ user=self.sender
+ )
+ thread_data = context['threads_data'][root.id]
+ self.assertEqual(thread_data['status'], 'seen')
+
class ModelsTests(GroupMessagingTests):
"""test cases for the `private_messaging` models"""