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/uploaders/object_storage/cdn_spec.rb')
-rw-r--r--spec/uploaders/object_storage/cdn_spec.rb27
1 files changed, 5 insertions, 22 deletions
diff --git a/spec/uploaders/object_storage/cdn_spec.rb b/spec/uploaders/object_storage/cdn_spec.rb
index f99450b274f..2a447921a19 100644
--- a/spec/uploaders/object_storage/cdn_spec.rb
+++ b/spec/uploaders/object_storage/cdn_spec.rb
@@ -44,30 +44,13 @@ RSpec.describe ObjectStorage::CDN do
end
describe '#cdn_enabled_url' do
- context 'with ci_job_artifacts_cdn feature flag disabled' do
- before do
- stub_feature_flags(ci_job_artifacts_cdn: false)
- end
-
- it 'calls #url' do
- expect(subject).to receive(:url).and_call_original
- expect(subject).not_to receive(:cdn_signed_url)
-
- result = subject.cdn_enabled_url(project, public_ip)
-
- expect(result.used_cdn).to be false
- end
- end
+ it 'calls #cdn_signed_url' do
+ expect(subject).not_to receive(:url)
+ expect(subject).to receive(:cdn_signed_url).and_call_original
- context 'with ci_job_artifacts_cdn feature flag enabled' do
- it 'calls #cdn_signed_url' do
- expect(subject).not_to receive(:url)
- expect(subject).to receive(:cdn_signed_url).and_call_original
+ result = subject.cdn_enabled_url(public_ip)
- result = subject.cdn_enabled_url(project, public_ip)
-
- expect(result.used_cdn).to be true
- end
+ expect(result.used_cdn).to be true
end
end