Skip to content
Browse files

[bug 704673] Fix mobile paginator.

  • Loading branch information...
1 parent 50d0443 commit 5650f9635ca6da799149d811e1e95c1095a00f7c @rlr rlr committed Nov 22, 2011
Showing with 8 additions and 1 deletion.
  1. +7 −0 apps/search/tests/test_search.py
  2. +1 −1 apps/sumo/helpers.py
View
7 apps/search/tests/test_search.py
@@ -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"""
View
2 apps/sumo/helpers.py
@@ -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

0 comments on commit 5650f96

Please sign in to comment.
Something went wrong with that request. Please try again.