summaryrefslogtreecommitdiff
path: root/spec/policies/group_policy_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/policies/group_policy_spec.rb')
-rw-r--r--spec/policies/group_policy_spec.rb20
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