gitlab-org--gitlab-foss/spec/features/security/profile_access_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.5 KiB
Ruby
Raw Normal View History

# frozen_string_literal: true
2011-10-08 21:36:38 +00:00
require 'spec_helper'
RSpec.describe "Profile access" do
include AccessMatchers
describe "GET /-/profile/keys" do
subject { profile_keys_path }
2012-08-25 17:43:55 +00:00
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
2011-10-08 21:36:38 +00:00
describe "GET /-/profile" do
subject { profile_path }
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
describe "GET /-/profile/account" do
subject { profile_account_path }
2012-08-25 17:43:55 +00:00
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
2013-09-25 11:05:03 +00:00
describe "GET /-/profile/preferences" do
2015-06-05 18:00:21 +00:00
subject { profile_preferences_path }
2013-09-25 11:05:03 +00:00
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
2013-09-25 11:05:03 +00:00
describe "GET /-/profile/audit_log" do
2015-07-03 11:54:50 +00:00
subject { audit_log_profile_path }
2013-09-25 11:05:03 +00:00
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
2013-09-25 11:05:03 +00:00
describe "GET /-/profile/notifications" do
subject { profile_notifications_path }
2013-09-25 11:05:03 +00:00
it { is_expected.to be_allowed_for :admin }
it { is_expected.to be_allowed_for :user }
it { is_expected.to be_denied_for :visitor }
2011-10-08 21:36:38 +00:00
end
end