BigW Consortium Gitlab

profile_access_spec.rb 1.42 KB
Newer Older
gitlabhq committed
1 2
require 'spec_helper'

3
describe "Profile access", feature: true  do
4 5
  include AccessMatchers

6 7
  describe "GET /profile/keys" do
    subject { profile_keys_path }
Robert Speicher committed
8

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

14 15
  describe "GET /profile" do
    subject { profile_path }
16

17 18 19 20
    it { is_expected.to be_allowed_for :admin }
    it { is_expected.to be_allowed_for :user }
    it { is_expected.to be_denied_for :visitor }
  end
21

22 23
  describe "GET /profile/account" do
    subject { profile_account_path }
Robert Speicher committed
24

25 26 27 28
    it { is_expected.to be_allowed_for :admin }
    it { is_expected.to be_allowed_for :user }
    it { is_expected.to be_denied_for :visitor }
  end
29

30 31
  describe "GET /profile/preferences" do
    subject { profile_preferences_path }
32

33 34 35 36
    it { is_expected.to be_allowed_for :admin }
    it { is_expected.to be_allowed_for :user }
    it { is_expected.to be_denied_for :visitor }
  end
37

38 39
  describe "GET /profile/audit_log" do
    subject { audit_log_profile_path }
40

41 42 43 44
    it { is_expected.to be_allowed_for :admin }
    it { is_expected.to be_allowed_for :user }
    it { is_expected.to be_denied_for :visitor }
  end
45

46 47
  describe "GET /profile/notifications" do
    subject { profile_notifications_path }
48

49 50 51
    it { is_expected.to be_allowed_for :admin }
    it { is_expected.to be_allowed_for :user }
    it { is_expected.to be_denied_for :visitor }
gitlabhq committed
52 53
  end
end