diff options
Diffstat (limited to 'spec/services/ci/unlock_artifacts_service_spec.rb')
-rw-r--r-- | spec/services/ci/unlock_artifacts_service_spec.rb | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/spec/services/ci/unlock_artifacts_service_spec.rb b/spec/services/ci/unlock_artifacts_service_spec.rb index f21afc7fe9e..c15e1cb2b5d 100644 --- a/spec/services/ci/unlock_artifacts_service_spec.rb +++ b/spec/services/ci/unlock_artifacts_service_spec.rb @@ -5,11 +5,11 @@ require 'spec_helper' RSpec.describe Ci::UnlockArtifactsService do using RSpec::Parameterized::TableSyntax - where(:tag, :ci_update_unlocked_job_artifacts) do - false | false - false | true - true | false - true | true + where(:tag) do + [ + [false], + [true] + ] end with_them do @@ -31,7 +31,6 @@ 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) end describe '#execute' do @@ -69,17 +68,11 @@ RSpec.describe Ci::UnlockArtifactsService do end it 'unlocks job artifact records' do - pending unless ci_update_unlocked_job_artifacts - expect { execute }.to change { ::Ci::JobArtifact.artifact_unlocked.count }.from(0).to(2) end it 'unlocks pipeline artifact records' do - 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 } - end + expect { execute }.to change { ::Ci::PipelineArtifact.artifact_unlocked.count }.from(0).to(1) end end @@ -111,17 +104,11 @@ RSpec.describe Ci::UnlockArtifactsService do end it 'unlocks job artifact records' do - pending unless ci_update_unlocked_job_artifacts - expect { execute }.to change { ::Ci::JobArtifact.artifact_unlocked.count }.from(0).to(8) end it 'unlocks pipeline artifact records' do - 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 } - end + expect { execute }.to change { ::Ci::PipelineArtifact.artifact_unlocked.count }.from(0).to(1) end end end |