admin_access_spec.rb 739 Bytes
Newer Older
gitlabhq's avatar
gitlabhq committed
1 2
require 'spec_helper'

3
describe "Admin::Projects" do
4 5
  include AccessMatchers

Nihad Abbasov's avatar
Nihad Abbasov committed
6
  describe "GET /admin/projects" do
7
    subject { admin_projects_path }
Robert Speicher's avatar
Robert Speicher committed
8

9 10 11
    it { is_expected.to be_allowed_for :admin }
    it { is_expected.to be_denied_for :user }
    it { is_expected.to be_denied_for :visitor }
gitlabhq's avatar
gitlabhq committed
12 13
  end

Nihad Abbasov's avatar
Nihad Abbasov committed
14
  describe "GET /admin/users" do
Robert Speicher's avatar
Robert Speicher committed
15 16
    subject { admin_users_path }

17 18 19
    it { is_expected.to be_allowed_for :admin }
    it { is_expected.to be_denied_for :user }
    it { is_expected.to be_denied_for :visitor }
gitlabhq's avatar
gitlabhq committed
20 21
  end

22
  describe "GET /admin/hooks" do
Robert Speicher's avatar
Robert Speicher committed
23 24
    subject { admin_hooks_path }

25 26 27
    it { is_expected.to be_allowed_for :admin }
    it { is_expected.to be_denied_for :user }
    it { is_expected.to be_denied_for :visitor }
gitlabhq's avatar
gitlabhq committed
28 29
  end
end