mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
controllers with rspec3 syntax
This commit is contained in:
parent
c96220ca76
commit
bc73238c8f
50 changed files with 955 additions and 955 deletions
|
@ -3,7 +3,7 @@ require 'spec_helper'
|
|||
describe Admin::ReportsController do
|
||||
|
||||
it "is a subclass of AdminController" do
|
||||
(Admin::ReportsController < Admin::AdminController).should == true
|
||||
expect(Admin::ReportsController < Admin::AdminController).to eq(true)
|
||||
end
|
||||
|
||||
context 'while logged in as an admin' do
|
||||
|
@ -23,7 +23,7 @@ describe Admin::ReportsController do
|
|||
|
||||
it "returns 404" do
|
||||
xhr :get, :show, type: invalid_id
|
||||
response.status.should == 404
|
||||
expect(response.status).to eq(404)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -36,7 +36,7 @@ describe Admin::ReportsController do
|
|||
end
|
||||
|
||||
it "renders the report as JSON" do
|
||||
response.status.should == 404
|
||||
expect(response.status).to eq(404)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -47,11 +47,11 @@ describe Admin::ReportsController do
|
|||
end
|
||||
|
||||
it "renders the report as JSON" do
|
||||
response.should be_success
|
||||
expect(response).to be_success
|
||||
end
|
||||
|
||||
it "renders the report as JSON" do
|
||||
::JSON.parse(response.body).should be_present
|
||||
expect(::JSON.parse(response.body)).to be_present
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue