Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-09 21:07:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-09 21:07:50 +0300
commit20f6a17ba2d2d5f056bda38dfe85e2a7b2a82d0b (patch)
tree1319f393750fa7a212455746273c05465d786fde /spec/policies
parente38a99eb0725697297386dd0bb1045b1fd55493a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/policies')
-rw-r--r--spec/policies/global_policy_spec.rb30
-rw-r--r--spec/policies/project_policy_spec.rb2
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