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:
authorToon Claes <toon@gitlab.com>2017-04-18 22:26:56 +0300
committerToon Claes <toon@gitlab.com>2017-04-24 11:07:01 +0300
commitccb9beeed0e418ef4dea201b3507bd2f4a14b4a2 (patch)
treeff75331541746d5ab9e27d9151cbccdae214fb43 /spec/models/ci
parentf07edb5af1e18be817e49e0afd86f59a6eef1cd9 (diff)
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