Fix spec failure
This commit is contained in:
parent
54263dc1d9
commit
97c556bf1d
|
@ -5,7 +5,7 @@ module Ci
|
|||
def execute(build, current_status)
|
||||
if valid_statuses_for_when(build.when).include?(current_status)
|
||||
if build.schedulable?
|
||||
build.schedule!
|
||||
build.schedule
|
||||
elsif build.action?
|
||||
build.actionize
|
||||
else
|
||||
|
|
|
@ -31,17 +31,14 @@ describe Ci::ProcessPipelineService, '#execute' do
|
|||
succeed_pending
|
||||
|
||||
expect(builds.success.count).to eq(2)
|
||||
expect(process_pipeline).to be_truthy
|
||||
|
||||
succeed_pending
|
||||
|
||||
expect(builds.success.count).to eq(4)
|
||||
expect(process_pipeline).to be_truthy
|
||||
|
||||
succeed_pending
|
||||
|
||||
expect(builds.success.count).to eq(5)
|
||||
expect(process_pipeline).to be_falsey
|
||||
end
|
||||
|
||||
it 'does not process pipeline if existing stage is running' do
|
||||
|
@ -718,7 +715,7 @@ describe Ci::ProcessPipelineService, '#execute' do
|
|||
end
|
||||
|
||||
def builds_names_and_statuses
|
||||
builds.each_with_object({}) do |h, b|
|
||||
builds.each_with_object({}) do |b, h|
|
||||
h[b.name.to_sym] = b.status
|
||||
h
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue