mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
controllers with rspec3 syntax
This commit is contained in:
parent
c96220ca76
commit
bc73238c8f
50 changed files with 955 additions and 955 deletions
|
@ -5,13 +5,13 @@ describe Admin::AdminController do
|
|||
context 'index' do
|
||||
|
||||
it 'needs you to be logged in' do
|
||||
lambda { xhr :get, :index }.should raise_error(Discourse::NotLoggedIn)
|
||||
expect { xhr :get, :index }.to raise_error(Discourse::NotLoggedIn)
|
||||
end
|
||||
|
||||
it "raises an error if you aren't an admin" do
|
||||
user = log_in
|
||||
xhr :get, :index
|
||||
response.should be_forbidden
|
||||
expect(response).to be_forbidden
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue