diff options
author | Bob Van Landuyt <bob@gitlab.com> | 2017-03-30 09:15:42 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@gitlab.com> | 2017-04-07 17:24:11 +0200 |
commit | 47abf00b24efb0f6263ea37eddf2d6587950c5ee (patch) | |
tree | 9159be8bffb2208834b23a0633a097fdb92f103c /spec/models | |
parent | 9082d1e046a8da394ea0b271f9f3fea909bb102c (diff) | |
download | gitlab-ce-47abf00b24efb0f6263ea37eddf2d6587950c5ee.tar.gz |
Update project build status cache when transitioning
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index 3f893fd3166..5caba6ae703 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -1079,17 +1079,18 @@ describe Ci::Pipeline, models: true do end end - describe '#update_status' do + describe 'update project cache when transitioning' do let(:pipeline) { create(:ci_pipeline, sha: '123456') } it 'updates the cached status' do fake_status = double expect(Gitlab::Cache::Ci::ProjectBuildStatus).to receive(:new). - with(pipeline.project, sha: '123456', status: 'skipped'). + with(pipeline.project, sha: '123456', status: 'manual'). and_return(fake_status) + expect(fake_status).to receive(:store_in_cache_if_needed) - pipeline.update_status + pipeline.block end end |