merge master

This commit is contained in:
Neil Lalonde
2016-03-31 17:33:25 -04:00
parent 95f2ac6535
commit 01d0aeb5a9
6371 changed files with 86540 additions and 60860 deletions

View File

@ -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