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 ...@@ -5,7 +5,7 @@ module Ci
def execute(build, current_status) def execute(build, current_status)
if valid_statuses_for_when(build.when).include?(current_status) if valid_statuses_for_when(build.when).include?(current_status)
if build.schedulable? if build.schedulable?
build.schedule! build.schedule
elsif build.action? elsif build.action?
build.actionize build.actionize
else else
......
...@@ -31,17 +31,14 @@ describe Ci::ProcessPipelineService, '#execute' do ...@@ -31,17 +31,14 @@ describe Ci::ProcessPipelineService, '#execute' do
succeed_pending succeed_pending
expect(builds.success.count).to eq(2) expect(builds.success.count).to eq(2)
expect(process_pipeline).to be_truthy
succeed_pending succeed_pending
expect(builds.success.count).to eq(4) expect(builds.success.count).to eq(4)
expect(process_pipeline).to be_truthy
succeed_pending succeed_pending
expect(builds.success.count).to eq(5) expect(builds.success.count).to eq(5)
expect(process_pipeline).to be_falsey
end end
it 'does not process pipeline if existing stage is running' do it 'does not process pipeline if existing stage is running' do
...@@ -718,7 +715,7 @@ describe Ci::ProcessPipelineService, '#execute' do ...@@ -718,7 +715,7 @@ describe Ci::ProcessPipelineService, '#execute' do
end end
def builds_names_and_statuses 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[b.name.to_sym] = b.status
h h
end 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