mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
FEATURE: Allow embedding topics without creating them, by id
This commit is contained in:
@ -16,6 +16,20 @@ describe EmbedController do
|
||||
expect(response).not_to be_success
|
||||
end
|
||||
|
||||
context "by topic id" do
|
||||
|
||||
before do
|
||||
SiteSetting.embeddable_hosts = host
|
||||
controller.request.stubs(:referer).returns('http://eviltrout.com/some-page')
|
||||
end
|
||||
|
||||
it "allows a topic to be embedded by id" do
|
||||
topic = Fabricate(:topic)
|
||||
get :comments, topic_id: topic.id
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
|
||||
context "with a host" do
|
||||
before do
|
||||
SiteSetting.embeddable_hosts = host
|
||||
|
Reference in New Issue
Block a user