debian-mirror-gitlab/spec/services/ci/pipeline_bridge_status_service_spec.rb
2020-03-09 13:42:32 +05:30

27 lines
677 B
Ruby

# 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