diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-08 09:08:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-08 09:08:50 +0300 |
commit | 6397f0322d3841d98d64e9c60bb84b94c40617d7 (patch) | |
tree | cc54eebf050e102dcf7394f5b94b7699148050df /spec/services/ci | |
parent | 91ed938e3d17d385a08459915972d7e3f6b8468e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/ci')
-rw-r--r-- | spec/services/ci/pipeline_bridge_status_service_spec.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/services/ci/pipeline_bridge_status_service_spec.rb b/spec/services/ci/pipeline_bridge_status_service_spec.rb new file mode 100644 index 00000000000..95f16af3af9 --- /dev/null +++ b/spec/services/ci/pipeline_bridge_status_service_spec.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe Ci::PipelineBridgeStatusService do + let(:user) { build(:user) } + let(:project) { build(:project) } + let(:pipeline) { build(:ci_pipeline, project: project) } + + describe '#execute' do + subject { described_class.new(project, user).execute(pipeline) } + + context 'when pipeline has upstream bridge' do + let(:bridge) { build(:ci_bridge) } + + before do + pipeline.source_bridge = bridge + end + + it 'calls inherit_status_from_downstream on upstream bridge' do + expect(bridge).to receive(:inherit_status_from_downstream!).with(pipeline) + + subject + end + end + end +end |