diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/policies/group_policy_spec.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'spec/policies/group_policy_spec.rb')
-rw-r--r-- | spec/policies/group_policy_spec.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/policies/group_policy_spec.rb b/spec/policies/group_policy_spec.rb index f5e389ff338..9fac5521aa6 100644 --- a/spec/policies/group_policy_spec.rb +++ b/spec/policies/group_policy_spec.rb @@ -924,53 +924,53 @@ RSpec.describe GroupPolicy do end end - context 'timelogs' do - context 'with admin' do + describe 'update_runners_registration_token' do + context 'admin' do let(:current_user) { admin } context 'when admin mode is enabled', :enable_admin_mode do - it { is_expected.to be_allowed(:read_group_timelogs) } + it { is_expected.to be_allowed(:update_runners_registration_token) } end context 'when admin mode is disabled' do - it { is_expected.to be_disallowed(:read_group_timelogs) } + it { is_expected.to be_disallowed(:update_runners_registration_token) } end end context 'with owner' do let(:current_user) { owner } - it { is_expected.to be_allowed(:read_group_timelogs) } + it { is_expected.to be_allowed(:update_runners_registration_token) } end context 'with maintainer' do let(:current_user) { maintainer } - it { is_expected.to be_allowed(:read_group_timelogs) } + it { is_expected.to be_allowed(:update_runners_registration_token) } end context 'with reporter' do let(:current_user) { reporter } - it { is_expected.to be_allowed(:read_group_timelogs) } + it { is_expected.to be_disallowed(:update_runners_registration_token) } end context 'with guest' do let(:current_user) { guest } - it { is_expected.to be_disallowed(:read_group_timelogs) } + it { is_expected.to be_disallowed(:update_runners_registration_token) } end context 'with non member' do let(:current_user) { create(:user) } - it { is_expected.to be_disallowed(:read_group_timelogs) } + it { is_expected.to be_disallowed(:update_runners_registration_token) } end context 'with anonymous' do let(:current_user) { nil } - it { is_expected.to be_disallowed(:read_group_timelogs) } + it { is_expected.to be_disallowed(:update_runners_registration_token) } end end end |