mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Fix all the errors to get our tests green on Rails 5.1.
This commit is contained in:
parent
898ee93547
commit
77d4c4d8dc
989 changed files with 5114 additions and 3117 deletions
|
@ -5,12 +5,14 @@ describe Admin::AdminController do
|
|||
context 'index' do
|
||||
|
||||
it 'needs you to be logged in' do
|
||||
expect { xhr :get, :index }.to raise_error(Discourse::NotLoggedIn)
|
||||
expect do
|
||||
get :index, format: :json
|
||||
end.to raise_error(Discourse::NotLoggedIn)
|
||||
end
|
||||
|
||||
it "raises an error if you aren't an admin" do
|
||||
user = log_in
|
||||
xhr :get, :index
|
||||
get :index, format: :json
|
||||
expect(response).to be_forbidden
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue