Adds page title to editor review
This commit is contained in:
Родитель
bdb6ef5827
Коммит
9d0edbb7e3
|
@ -26,8 +26,8 @@ def editor_page_title(context, title=None, addon=None):
|
|||
if addon:
|
||||
title = u'%s :: %s' % (title, addon.name)
|
||||
else:
|
||||
devhub = _('Editor Tools')
|
||||
title = '%s :: %s' % (title, devhub) if title else devhub
|
||||
section = unicode(_('Editor Tools'))
|
||||
title = '%s :: %s' % (title, section) if title else section
|
||||
return page_title(context, title)
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
{% extends "editors/base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ editor_page_title(title=addon.name) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block bodyclass %}inverse{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
|
|
@ -813,6 +813,13 @@ class TestReview(ReviewBase):
|
|||
response = self.client.get(self.url)
|
||||
eq_(response.context['paging'], {})
|
||||
|
||||
def test_page_title(self):
|
||||
response = self.client.get(self.url)
|
||||
eq_(response.status_code, 200)
|
||||
doc = pq(response.content)
|
||||
eq_(doc('title').text(),
|
||||
'%s :: Editor Tools :: Add-ons' % self.addon.name)
|
||||
|
||||
def test_paging_num(self):
|
||||
response = self.client.get('%s?num=1' % self.url)
|
||||
eq_(response.context['paging']['prev'], False)
|
||||
|
|
Загрузка…
Ссылка в новой задаче