mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 17:41:17 +08:00
controllers with rspec3 syntax
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user