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-08-08 18:10:32 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-08 18:10:32 +0300
commit3de2ce7c6b536d63ea2f93239022eb51fa9241c1 (patch)
treeac66971b2cb57f1b24f1f03879abf9b27398fa10 /spec/controllers
parent61cf5b32c5a6a3982a704d33e72ea9b391a3b04d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/projects/ci/secure_files_controller_spec.rb67
1 files changed, 0 insertions, 67 deletions
diff --git a/spec/controllers/projects/ci/secure_files_controller_spec.rb b/spec/controllers/projects/ci/secure_files_controller_spec.rb
deleted file mode 100644
index 200997e31b9..00000000000
--- a/spec/controllers/projects/ci/secure_files_controller_spec.rb
+++ /dev/null
@@ -1,67 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe Projects::Ci::SecureFilesController do
- let_it_be(:project) { create(:project) }
- let_it_be(:user) { create(:user) }
-
- subject(:show_request) { get :show, params: { namespace_id: project.namespace, project_id: project } }
-
- describe 'GET #show' do
- context 'when the :ci_secure_files feature flag is enabled' do
- context 'with enough privileges' do
- before do
- stub_feature_flags(ci_secure_files: true)
- sign_in(user)
- project.add_developer(user)
- show_request
- end
-
- it { expect(response).to have_gitlab_http_status(:ok) }
-
- it 'renders show page' do
- expect(response).to render_template :show
- end
- end
- end
-
- context 'when the :ci_secure_files feature flag is disabled' do
- context 'with enough privileges' do
- before do
- stub_feature_flags(ci_secure_files: false)
- sign_in(user)
- project.add_developer(user)
- show_request
- end
-
- it 'responds with 404' do
- expect(response).to have_gitlab_http_status(:not_found)
- end
- end
- end
-
- context 'without enough privileges' do
- before do
- sign_in(user)
- project.add_reporter(user)
- show_request
- end
-
- it 'responds with 404' do
- expect(response).to have_gitlab_http_status(:not_found)
- end
- end
-
- context 'an unauthenticated user' do
- before do
- show_request
- end
-
- it 'redirects to sign in' do
- expect(response).to have_gitlab_http_status(:found)
- expect(response).to redirect_to('/users/sign_in')
- end
- end
- end
-end