Navigation Menu

Skip to content

Commit

Permalink
[bug 704673] Fix mobile paginator.
Browse files Browse the repository at this point in the history
  • Loading branch information
rlr committed Nov 23, 2011
1 parent 50d0443 commit 5650f96
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions apps/search/tests/test_search.py
Expand Up @@ -83,6 +83,13 @@ def test_content(self):
eq_('text/html; charset=utf-8', response['Content-Type'])
eq_(200, response.status_code)

def test_content_mobile(self):
"""Ensure mobile template is rendered."""
self.client.cookies[settings.MOBILE_COOKIE] = 'on'
response = self.client.get(reverse('search'), {'q': 'audio', 'w': 3})
eq_('text/html; charset=utf-8', response['Content-Type'])
eq_(200, response.status_code)

def test_search_type_param(self):
"""Ensure that invalid values for search type (a=)
does not cause errors"""
Expand Down
2 changes: 1 addition & 1 deletion apps/sumo/helpers.py
Expand Up @@ -36,7 +36,7 @@ def paginator(pager):
@register.filter
def mobile_paginator(pager):
t = env.get_template('includes/mobile/paginator.html')
return jinja2.Markup(t.render(pager=pager))
return jinja2.Markup(t.render({'pager': pager}))


@register.function
Expand Down

0 comments on commit 5650f96

Please sign in to comment.