Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[bug 704673] Fix mobile paginator.

  • Loading branch information...
commit 2c582d7c1d229c09dad16105dbf9f2492e85b369 1 parent 0ed5b60
ricky rosario rlr authored
7 apps/search/tests/test_search.py
@@ -83,6 +83,13 @@ def test_content(self):
83 83 eq_('text/html; charset=utf-8', response['Content-Type'])
84 84 eq_(200, response.status_code)
85 85
  86 + def test_content_mobile(self):
  87 + """Ensure mobile template is rendered."""
  88 + self.client.cookies[settings.MOBILE_COOKIE] = 'on'
  89 + response = self.client.get(reverse('search'), {'q': 'audio', 'w': 3})
  90 + eq_('text/html; charset=utf-8', response['Content-Type'])
  91 + eq_(200, response.status_code)
  92 +
86 93 def test_search_type_param(self):
87 94 """Ensure that invalid values for search type (a=)
88 95 does not cause errors"""
2  apps/sumo/helpers.py
@@ -36,7 +36,7 @@ def paginator(pager):
36 36 @register.filter
37 37 def mobile_paginator(pager):
38 38 t = env.get_template('includes/mobile/paginator.html')
39   - return jinja2.Markup(t.render(pager=pager))
  39 + return jinja2.Markup(t.render({'pager': pager}))
40 40
41 41
42 42 @register.function

0 comments on commit 2c582d7

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