This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
discourse/spec/controllers/admin/admin_controller_spec.rb
2013-02-05 14:16:51 -05:00

20 lines
355 B
Ruby

require 'spec_helper'
describe Admin::AdminController do
context 'index' do
it 'needs you to be logged in' do
lambda { xhr :get, :index }.should 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
end
end
end