Permalink
Browse files

Added a small test to make sure that the "Browse: Older" link shows up.

  • Loading branch information...
1 parent 5b2e399 commit c816149a7a4a434a8f7d19f31cc561960637cb4f tony.t.tseng committed Aug 20, 2009
Showing with 15 additions and 0 deletions.
  1. +15 −0 actor/tests.py
View
@@ -21,6 +21,8 @@
from django.conf import settings
from django.core import mail
+from actor import views
+
from common.tests import ViewTestCase
from common import api
@@ -126,6 +128,19 @@ def test_rss_and_atom_feeds(self):
self.assertContains(r, 'href="/user/popular/rss"')
self.assertContains(r, 'href="/user/popular/atom"')
+ def test_browse_older(self):
+ popular_ref = api.actor_get(api.ROOT, 'popular')
+ existing_entries_per_page = views.ENTRIES_PER_PAGE
+ # change the entries per page setting to make sure that the paging
+ # link shows up
+ try:
+ views.ENTRIES_PER_PAGE = 3
+ r = self.client.get('/user/popular')
+ self.assertContains(r, '<div class="paging">')
+ self.assertContains(r, 'Older')
+ finally:
+ views.ENTRIES_PER_PAGE = existing_entries_per_page
+
class SubscriptionTest(ViewTestCase):
def test_subscribe_and_unsubscribe(self):

0 comments on commit c816149

Please sign in to comment.