Skip to content

Commit

Permalink
Added a small test to make sure that the "Browse: Older" link shows up.
Browse files Browse the repository at this point in the history
  • Loading branch information
tony.t.tseng committed Aug 20, 2009
1 parent 5b2e399 commit c816149
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions actor/tests.py
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit c816149

Please sign in to comment.