summaryrefslogtreecommitdiff
path: root/spec/models/ci
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2017-04-18 21:26:56 +0200
committerToon Claes <toon@gitlab.com>2017-04-24 10:07:01 +0200
commitccb9beeed0e418ef4dea201b3507bd2f4a14b4a2 (patch)
treeff75331541746d5ab9e27d9151cbccdae214fb43 /spec/models/ci
parentf07edb5af1e18be817e49e0afd86f59a6eef1cd9 (diff)
downloadgitlab-ce-ccb9beeed0e418ef4dea201b3507bd2f4a14b4a2.tar.gz
Properly expire cache for **all** MRs of a pipeline
Turn ExpirePipelineCacheService into Worker so it can fetch all the merge requests for which the pipeline runs or did run against.
Diffstat (limited to 'spec/models/ci')
-rw-r--r--spec/models/ci/pipeline_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb
index d7d6a75d38d..42c0791fba1 100644
--- a/spec/models/ci/pipeline_spec.rb
+++ b/spec/models/ci/pipeline_spec.rb
@@ -376,8 +376,8 @@ describe Ci::Pipeline, models: true do
end
describe 'pipeline caching' do
- it 'executes ExpirePipelinesCacheService' do
- expect_any_instance_of(Ci::ExpirePipelineCacheService).to receive(:execute).with(pipeline)
+ it 'performs ExpirePipelinesCacheWorker' do
+ expect(ExpirePipelineCacheWorker).to receive(:perform_async).with(pipeline.id)
pipeline.cancel
end