Commit 97c556bf authored by Shinya Maeda's avatar Shinya Maeda Committed by Alessio Caiazza

Fix spec failure

parent 54263dc1
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment