mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
FIX: use topic summary for meta description if topic excerpt is blank
This commit is contained in:
@ -1407,6 +1407,17 @@ RSpec.describe TopicsController do
|
||||
expect(response.headers['Discourse-Readonly']).to eq('true')
|
||||
end
|
||||
end
|
||||
|
||||
describe "image only topic" do
|
||||
it "uses image alt tag for meta description" do
|
||||
post = Fabricate(:post, raw: "")
|
||||
|
||||
get post.topic.url
|
||||
|
||||
body = response.body
|
||||
expect(body).to have_tag(:meta, with: { name: 'description', content: '[image_description]' })
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#post_ids' do
|
||||
|
Reference in New Issue
Block a user