зеркало из https://github.com/mozilla/kitsune.git
Make sure breadcrumb URLs start with a /.
This commit is contained in:
Родитель
7b5032d32b
Коммит
0e2b8d442d
|
@ -0,0 +1,23 @@
|
|||
import pyquery
|
||||
|
||||
from django.test.client import Client
|
||||
|
||||
import jingo
|
||||
from nose.tools import eq_
|
||||
|
||||
from sumo.urlresolvers import reverse
|
||||
|
||||
|
||||
def setup():
|
||||
jingo.load_helpers()
|
||||
Client().get('/')
|
||||
|
||||
|
||||
def test_breadcrumb():
|
||||
"""Make sure breadcrumb links start with /."""
|
||||
c = Client()
|
||||
response = c.get(reverse('search'))
|
||||
|
||||
doc = pyquery.PyQuery(response.content)
|
||||
href = doc('#breadcrumbs a')[0]
|
||||
eq_('/', href.attrib['href'][0])
|
|
@ -15,6 +15,7 @@ nose==0.11.1
|
|||
coverage==3.2b4
|
||||
selenium==1.0.1
|
||||
mock==0.6.0
|
||||
pyquery==0.5
|
||||
translate-toolkit==1.6.0
|
||||
|
||||
pylint==0.20.0
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
{% block breadcrumbs %}
|
||||
<div id="breadcrumbs">
|
||||
<ul>
|
||||
<li><a href="{{ request.locale }}/kb/">{{ _('Firefox Support') }}</a></li>
|
||||
<li><a href="/{{ request.locale }}/kb/">{{ _('Firefox Support') }}</a></li>
|
||||
<li class="divider">/</li><li>{{ title }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Загрузка…
Ссылка в новой задаче