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:
Diffstat (limited to 'spec/helpers/ci/secure_files_helper_spec.rb')
-rw-r--r--spec/helpers/ci/secure_files_helper_spec.rb62
1 files changed, 22 insertions, 40 deletions
diff --git a/spec/helpers/ci/secure_files_helper_spec.rb b/spec/helpers/ci/secure_files_helper_spec.rb
index 02da44f56b2..54307e670e1 100644
--- a/spec/helpers/ci/secure_files_helper_spec.rb
+++ b/spec/helpers/ci/secure_files_helper_spec.rb
@@ -19,58 +19,40 @@ RSpec.describe Ci::SecureFilesHelper do
subject { helper.show_secure_files_setting(project, user) }
describe '#show_secure_files_setting' do
- context 'when the :ci_secure_files feature flag is enabled' do
- before do
- stub_feature_flags(ci_secure_files: true)
- end
+ context 'authenticated user with admin permissions' do
+ let(:user) { maintainer }
- context 'authenticated user with admin permissions' do
- let(:user) { maintainer }
-
- it { is_expected.to be true }
- end
-
- context 'authenticated user with read permissions' do
- let(:user) { developer }
-
- it { is_expected.to be true }
- end
+ it { is_expected.to be true }
+ end
- context 'authenticated user with guest permissions' do
- let(:user) { guest }
+ context 'authenticated user with read permissions' do
+ let(:user) { developer }
- it { is_expected.to be false }
- end
+ it { is_expected.to be true }
+ end
- context 'authenticated user with no permissions' do
- let(:user) { anonymous }
+ context 'authenticated user with guest permissions' do
+ let(:user) { guest }
- it { is_expected.to be false }
- end
+ it { is_expected.to be false }
+ end
- context 'unconfirmed user' do
- let(:user) { unconfirmed }
+ context 'authenticated user with no permissions' do
+ let(:user) { anonymous }
- it { is_expected.to be false }
- end
+ it { is_expected.to be false }
+ end
- context 'unauthenticated user' do
- let(:user) { nil }
+ context 'unconfirmed user' do
+ let(:user) { unconfirmed }
- it { is_expected.to be false }
- end
+ it { is_expected.to be false }
end
- context 'when the :ci_secure_files feature flag is disabled' do
- before do
- stub_feature_flags(ci_secure_files: false)
- end
-
- context 'authenticated user with admin permissions' do
- let(:user) { maintainer }
+ context 'unauthenticated user' do
+ let(:user) { nil }
- it { is_expected.to be false }
- end
+ it { is_expected.to be false }
end
end
end