diff options
Diffstat (limited to 'spec/workers/expire_pipeline_cache_worker_spec.rb')
-rw-r--r-- | spec/workers/expire_pipeline_cache_worker_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/workers/expire_pipeline_cache_worker_spec.rb b/spec/workers/expire_pipeline_cache_worker_spec.rb index 8d898ffc13e..61ea22fbd32 100644 --- a/spec/workers/expire_pipeline_cache_worker_spec.rb +++ b/spec/workers/expire_pipeline_cache_worker_spec.rb @@ -11,7 +11,9 @@ describe ExpirePipelineCacheWorker do describe '#perform' do it 'executes the service' do - expect_any_instance_of(Ci::ExpirePipelineCacheService).to receive(:execute).with(pipeline).and_call_original + expect_next_instance_of(Ci::ExpirePipelineCacheService) do |instance| + expect(instance).to receive(:execute).with(pipeline).and_call_original + end subject.perform(pipeline.id) end @@ -31,5 +33,9 @@ describe ExpirePipelineCacheWorker do subject.perform(pipeline.id) end + + it_behaves_like 'an idempotent worker' do + let(:job_args) { [pipeline.id] } + end end end |