debian-mirror-gitlab/spec/features/security/admin_access_spec.rb

30 lines
766 B
Ruby
Raw Normal View History

2014-09-02 14:37:02 +02:00
require 'spec_helper'
describe "Admin::Projects", feature: true do
2015-09-11 14:41:01 +05:30
include AccessMatchers
2014-09-02 14:37:02 +02:00
describe "GET /admin/projects" do
2015-04-26 09:18:37 +02:00
subject { admin_namespaces_projects_path }
2014-09-02 14:37:02 +02:00
2015-04-26 09:18:37 +02:00
it { is_expected.to be_allowed_for :admin }
it { is_expected.to be_denied_for :user }
it { is_expected.to be_denied_for :visitor }
2014-09-02 14:37:02 +02:00
end
describe "GET /admin/users" do
subject { admin_users_path }
2015-04-26 09:18:37 +02:00
it { is_expected.to be_allowed_for :admin }
it { is_expected.to be_denied_for :user }
it { is_expected.to be_denied_for :visitor }
2014-09-02 14:37:02 +02:00
end
describe "GET /admin/hooks" do
subject { admin_hooks_path }
2015-04-26 09:18:37 +02:00
it { is_expected.to be_allowed_for :admin }
it { is_expected.to be_denied_for :user }
it { is_expected.to be_denied_for :visitor }
2014-09-02 14:37:02 +02:00
end
end