mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 08:57:10 -06:00
FIX: title was repeating on about page
This commit is contained in:
parent
c275027939
commit
654d7996ae
@ -1,7 +1,5 @@
|
||||
<% if crawler_layout? %>
|
||||
|
||||
<% content_for :title do %><%=t "about" %> - <%= SiteSetting.title %><% end %>
|
||||
|
||||
<section itemscope itemtype="https://schema.org/AboutPage">
|
||||
<h1 itemprop="name">
|
||||
<%=t "js.about.title", {title: @about.title} %>
|
||||
|
@ -9,6 +9,7 @@ describe AboutController do
|
||||
get "/about"
|
||||
|
||||
expect(response.status).to eq(200)
|
||||
expect(response.body).to include("<title>About - Discourse</title>")
|
||||
end
|
||||
|
||||
it 'should redirect to login page for anonymous user when login_required is true' do
|
||||
@ -25,5 +26,13 @@ describe AboutController do
|
||||
|
||||
expect(response.status).to eq(200)
|
||||
end
|
||||
|
||||
context "crawler view" do
|
||||
it "should include correct title" do
|
||||
get '/about', headers: { 'HTTP_USER_AGENT' => 'Googlebot' }
|
||||
expect(response.status).to eq(200)
|
||||
expect(response.body).to include("<title>About - Discourse</title>")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -101,6 +101,7 @@ describe StaticController do
|
||||
|
||||
expect(response.status).to eq(200)
|
||||
expect(response.body).to include(I18n.t('js.faq'))
|
||||
expect(response.body).to include("<title>FAQ - Discourse</title>")
|
||||
end
|
||||
end
|
||||
|
||||
@ -186,6 +187,14 @@ describe StaticController do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "crawler view" do
|
||||
it "should include correct title" do
|
||||
get '/faq', headers: { 'HTTP_USER_AGENT' => 'Googlebot' }
|
||||
expect(response.status).to eq(200)
|
||||
expect(response.body).to include("<title>FAQ - Discourse</title>")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#enter' do
|
||||
|
Loading…
Reference in New Issue
Block a user