FIX: Don't show the filter title on the default route

This commit is contained in:
Robin Ward
2015-03-30 11:40:44 -04:00
parent 10b8eca9a6
commit 28864e74bc
2 changed files with 15 additions and 2 deletions

View File

@ -11,6 +11,18 @@ describe ListController do
SiteSetting.stubs(:top_menu).returns('latest,-video|new|unread|categories|category/beer')
end
describe 'titles for crawler layout' do
it 'has no title for the default URL' do
xhr :get, Discourse.anonymous_filters[0], _escaped_fragment_: 'true'
expect(assigns(:title)).to be_blank
end
it 'has a title for non-default URLs' do
xhr :get, Discourse.anonymous_filters[1], _escaped_fragment_: 'true'
expect(assigns(:title)).to be_present
end
end
describe 'indexes' do
(Discourse.anonymous_filters - [:categories]).each do |filter|