diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-08 00:08:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-08 00:08:30 +0300 |
commit | e0d38e233de6113b51f784452d0f1f805356adaa (patch) | |
tree | e7e087fc5413c3b6176793a6f63f0b398640f99a /spec/helpers | |
parent | 9ee2305f46a2b3d1d1e8a1f1182512599a74dbe1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/ci/secure_files_helper_spec.rb | 12 |
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 } |