diff options
Diffstat (limited to 'spec/models/ci/pipeline_spec.rb')
-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 |