diff options
Diffstat (limited to 'spec/policies')
-rw-r--r-- | spec/policies/global_policy_spec.rb | 30 | ||||
-rw-r--r-- | spec/policies/project_policy_spec.rb | 2 |
2 files changed, 1 insertions, 31 deletions
diff --git a/spec/policies/global_policy_spec.rb b/spec/policies/global_policy_spec.rb index da0427420e4..4a8855f1da7 100644 --- a/spec/policies/global_policy_spec.rb +++ b/spec/policies/global_policy_spec.rb @@ -591,34 +591,4 @@ RSpec.describe GlobalPolicy do it { is_expected.not_to be_allowed(:log_in) } end end - - describe 'delete runners' do - context 'when anonymous' do - let(:current_user) { nil } - - it { is_expected.not_to be_allowed(:delete_runners) } - end - - context 'regular user' do - it { is_expected.not_to be_allowed(:delete_runners) } - end - - context 'when external' do - let(:current_user) { build(:user, :external) } - - it { is_expected.not_to be_allowed(:delete_runners) } - end - - context 'admin user' do - let_it_be(:current_user) { create(:user, :admin) } - - context 'when admin mode is enabled', :enable_admin_mode do - it { is_expected.to be_allowed(:delete_runners) } - end - - context 'when admin mode is disabled' do - it { is_expected.to be_disallowed(:delete_runners) } - end - end - end end diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb index 09fed665479..973ed66b8d8 100644 --- a/spec/policies/project_policy_spec.rb +++ b/spec/policies/project_policy_spec.rb @@ -323,7 +323,7 @@ RSpec.describe ProjectPolicy do :create_environment, :read_environment, :update_environment, :admin_environment, :destroy_environment, :create_cluster, :read_cluster, :update_cluster, :admin_cluster, :create_deployment, :read_deployment, :update_deployment, :admin_deployment, :destroy_deployment, - :destroy_release, :download_code, :build_download_code + :download_code, :build_download_code ] end |