mirror of
https://github.com/discourse/discourse.git
synced 2025-09-10 21:01:33 +08:00
controllers with rspec3 syntax
This commit is contained in:
parent
c96220ca76
commit
bc73238c8f
50 changed files with 955 additions and 955 deletions
|
@ -7,13 +7,13 @@ describe EmbedController do
|
|||
|
||||
it "is 404 without an embed_url" do
|
||||
get :comments
|
||||
response.should_not be_success
|
||||
expect(response).not_to be_success
|
||||
end
|
||||
|
||||
it "raises an error with a missing host" do
|
||||
SiteSetting.stubs(:embeddable_host).returns(nil)
|
||||
get :comments, embed_url: embed_url
|
||||
response.should_not be_success
|
||||
expect(response).not_to be_success
|
||||
end
|
||||
|
||||
context "with a host" do
|
||||
|
@ -23,7 +23,7 @@ describe EmbedController do
|
|||
|
||||
it "raises an error with no referer" do
|
||||
get :comments, embed_url: embed_url
|
||||
response.should_not be_success
|
||||
expect(response).not_to be_success
|
||||
end
|
||||
|
||||
context "success" do
|
||||
|
@ -33,8 +33,8 @@ describe EmbedController do
|
|||
end
|
||||
|
||||
after do
|
||||
response.should be_success
|
||||
response.headers['X-Frame-Options'].should == "ALLOWALL"
|
||||
expect(response).to be_success
|
||||
expect(response.headers['X-Frame-Options']).to eq("ALLOWALL")
|
||||
end
|
||||
|
||||
it "tells the topic retriever to work when no previous embed is found" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue