Commit b6f4cb52 authored by Maxime Orefice's avatar Maxime Orefice

Improve destroy expired PipelineArtifact spec

parent 06a3f976
......@@ -132,8 +132,8 @@ RSpec.describe Ci::DestroyExpiredJobArtifactsService, :clean_gitlab_redis_shared
end
context 'when artifacts are not expired' do
let!(:pipeline_artifact_1) { create(:ci_pipeline_artifact, expire_at: 2.days) }
let!(:pipeline_artifact_2) { create(:ci_pipeline_artifact, expire_at: 2.days) }
let!(:pipeline_artifact_1) { create(:ci_pipeline_artifact, expire_at: 2.days.from_now) }
let!(:pipeline_artifact_2) { create(:ci_pipeline_artifact, expire_at: 2.days.from_now) }
it 'do not destroy pipeline artifacts' do
expect { subject }.not_to change { Ci::PipelineArtifact.count }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment