Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[bug 704673] Fix mobile paginator.

  • Loading branch information...
commit 5650f9635ca6da799149d811e1e95c1095a00f7c 1 parent 50d0443
@rlr rlr authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.