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/services/ci/unlock_artifacts_service_spec.rb')
-rw-r--r--spec/services/ci/unlock_artifacts_service_spec.rb21
1 files changed, 8 insertions, 13 deletions
diff --git a/spec/services/ci/unlock_artifacts_service_spec.rb b/spec/services/ci/unlock_artifacts_service_spec.rb
index 776019f03f8..f21afc7fe9e 100644
--- a/spec/services/ci/unlock_artifacts_service_spec.rb
+++ b/spec/services/ci/unlock_artifacts_service_spec.rb
@@ -5,15 +5,11 @@ require 'spec_helper'
RSpec.describe Ci::UnlockArtifactsService do
using RSpec::Parameterized::TableSyntax
- where(:tag, :ci_update_unlocked_job_artifacts, :ci_update_unlocked_pipeline_artifacts) do
- false | false | false
- false | true | false
- true | false | false
- true | true | false
- false | false | true
- false | true | true
- true | false | true
- true | true | true
+ where(:tag, :ci_update_unlocked_job_artifacts) do
+ false | false
+ false | true
+ true | false
+ true | true
end
with_them do
@@ -35,8 +31,7 @@ RSpec.describe Ci::UnlockArtifactsService do
before do
stub_const("#{described_class}::BATCH_SIZE", 1)
- stub_feature_flags(ci_update_unlocked_job_artifacts: ci_update_unlocked_job_artifacts,
- ci_update_unlocked_pipeline_artifacts: ci_update_unlocked_pipeline_artifacts)
+ stub_feature_flags(ci_update_unlocked_job_artifacts: ci_update_unlocked_job_artifacts)
end
describe '#execute' do
@@ -80,7 +75,7 @@ RSpec.describe Ci::UnlockArtifactsService do
end
it 'unlocks pipeline artifact records' do
- if ci_update_unlocked_job_artifacts && ci_update_unlocked_pipeline_artifacts
+ if ci_update_unlocked_job_artifacts
expect { execute }.to change { ::Ci::PipelineArtifact.artifact_unlocked.count }.from(0).to(1)
else
expect { execute }.not_to change { ::Ci::PipelineArtifact.artifact_unlocked.count }
@@ -122,7 +117,7 @@ RSpec.describe Ci::UnlockArtifactsService do
end
it 'unlocks pipeline artifact records' do
- if ci_update_unlocked_job_artifacts && ci_update_unlocked_pipeline_artifacts
+ if ci_update_unlocked_job_artifacts
expect { execute }.to change { ::Ci::PipelineArtifact.artifact_unlocked.count }.from(0).to(1)
else
expect { execute }.not_to change { ::Ci::PipelineArtifact.artifact_unlocked.count }