|
@@ -110,10 +110,22 @@ class GotoListsViewsTests(AuthenticatedUserTestCase):
|
|
|
self.assertIn("There are no posts to display on this list.",
|
|
|
response.content)
|
|
|
|
|
|
+ # post 10 posts with closed reports
|
|
|
+ [reply_thread(self.thread, has_reports=True) for i in xrange(10)]
|
|
|
+
|
|
|
+ # assert that posts don't show
|
|
|
+ self.override_acl({'can_see_reports': True})
|
|
|
+ response = self.client.get(self.thread.get_reported_url(),
|
|
|
+ **self.ajax_header)
|
|
|
+ self.assertEqual(response.status_code, 200)
|
|
|
+ self.assertIn("0 reported posts", response.content)
|
|
|
+ self.assertIn("There are no posts to display on this list.",
|
|
|
+ response.content)
|
|
|
+
|
|
|
# post 10 reported posts
|
|
|
posts = []
|
|
|
for i in xrange(10):
|
|
|
- posts.append(reply_thread(self.thread, has_reports=True))
|
|
|
+ posts.append(reply_thread(self.thread, has_open_reports=True))
|
|
|
|
|
|
# assert that posts show
|
|
|
self.override_acl({'can_see_reports': True})
|
|
@@ -130,7 +142,7 @@ class GotoListsViewsTests(AuthenticatedUserTestCase):
|
|
|
# overflow list via posting extra 20 reported posts
|
|
|
posts = []
|
|
|
for i in xrange(20):
|
|
|
- posts.append(reply_thread(self.thread, has_reports=True))
|
|
|
+ posts.append(reply_thread(self.thread, has_open_reports=True))
|
|
|
|
|
|
# assert that posts don't show
|
|
|
self.override_acl({'can_see_reports': True})
|