mirror of
https://github.com/discourse/discourse.git
synced 2025-06-25 01:30:17 +08:00
merge master
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
require 'spec_helper'
|
||||
require 'rails_helper'
|
||||
|
||||
describe EmbedController do
|
||||
|
||||
let(:host) { "eviltrout.com" }
|
||||
let(:embed_url) { "http://eviltrout.com/2013/02/10/why-discourse-uses-emberjs.html" }
|
||||
let(:discourse_username) { "eviltrout" }
|
||||
|
||||
it "is 404 without an embed_url" do
|
||||
get :comments
|
||||
@ -94,6 +95,12 @@ describe EmbedController do
|
||||
TopicView.expects(:new).with(123, nil, {limit: 100, exclude_first: true, exclude_deleted_users: true})
|
||||
get :comments, embed_url: embed_url
|
||||
end
|
||||
|
||||
it "provides the topic retriever with the discourse username when provided" do
|
||||
TopicRetriever.expects(:new).with(embed_url, has_entry({author_username: discourse_username}))
|
||||
get :comments, embed_url: embed_url, discourse_username: discourse_username
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user