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>2023-06-08 00:08:30 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-08 00:08:30 +0300
commite0d38e233de6113b51f784452d0f1f805356adaa (patch)
treee7e087fc5413c3b6176793a6f63f0b398640f99a /spec/helpers
parent9ee2305f46a2b3d1d1e8a1f1182512599a74dbe1 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/ci/secure_files_helper_spec.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/helpers/ci/secure_files_helper_spec.rb b/spec/helpers/ci/secure_files_helper_spec.rb
index 54307e670e1..049a09afd03 100644
--- a/spec/helpers/ci/secure_files_helper_spec.rb
+++ b/spec/helpers/ci/secure_files_helper_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Ci::SecureFilesHelper do
+RSpec.describe Ci::SecureFilesHelper, feature_category: :mobile_devops do
let_it_be(:maintainer) { create(:user) }
let_it_be(:developer) { create(:user) }
let_it_be(:guest) { create(:user) }
@@ -19,6 +19,16 @@ RSpec.describe Ci::SecureFilesHelper do
subject { helper.show_secure_files_setting(project, user) }
describe '#show_secure_files_setting' do
+ context 'when disabled at the instance level' do
+ before do
+ stub_config(ci_secure_files: { enabled: false })
+ end
+
+ let(:user) { maintainer }
+
+ it { is_expected.to be false }
+ end
+
context 'authenticated user with admin permissions' do
let(:user) { maintainer }