Remove the topic_featured_link_onebox setting. We will always try to onebox a link and add it to the body if topic_featured_link_enabled is enabled.

This commit is contained in:
Neil Lalonde
2016-12-09 13:28:12 -05:00
parent f07443b488
commit a4c4f13901
7 changed files with 8 additions and 31 deletions

View File

@ -20,7 +20,7 @@ describe PostCreator do
let(:creator_with_category) { PostCreator.new(user, basic_topic_params.merge(category: category.id )) }
let(:creator_with_meta_data) { PostCreator.new(user, basic_topic_params.merge(meta_data: {hello: "world"} )) }
let(:creator_with_image_sizes) { PostCreator.new(user, basic_topic_params.merge(image_sizes: image_sizes)) }
let(:creator_with_featured_link) { PostCreator.new(user, title: "featured link topic", archetype_id: 1, featured_link: "http://discourse.org") }
let(:creator_with_featured_link) { PostCreator.new(user, title: "featured link topic", archetype_id: 1, featured_link: "http://www.discourse.org", raw: "http://www.discourse.org") }
it "can create a topic with null byte central" do
post = PostCreator.create(user, title: "hello\u0000world this is title", raw: "this is my\u0000 first topic")
@ -244,12 +244,10 @@ describe PostCreator do
end
end
it 'creates a post without raw' do
it 'creates a post with featured link' do
SiteSetting.topic_featured_link_enabled = true
SiteSetting.topic_featured_link_onebox = true
post = creator_with_featured_link.create
expect(post.topic.featured_link).to eq('http://discourse.org')
expect(post.raw).to eq('http://discourse.org')
expect(post.topic.featured_link).to eq('http://www.discourse.org')
end
describe "topic's auto close" do