Commit c3a62181 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Improve helpers in pipeline model specs

parent 3fdba5c9
...@@ -328,7 +328,7 @@ describe Ci::Pipeline, models: true do ...@@ -328,7 +328,7 @@ describe Ci::Pipeline, models: true do
context 'when pipeline becomes blocked' do context 'when pipeline becomes blocked' do
let!(:build) { create_build('build:1') } let!(:build) { create_build('build:1') }
let!(:action) { create(:ci_build, :manual, pipeline: pipeline) } let!(:action) { create_build('manual:action', :manual) }
before do before do
travel_to(current + 1.minute) do travel_to(current + 1.minute) do
...@@ -407,8 +407,8 @@ describe Ci::Pipeline, models: true do ...@@ -407,8 +407,8 @@ describe Ci::Pipeline, models: true do
end end
end end
def create_build(name, queued_at: current, started_from: 0, **opts) def create_build(name, *traits, queued_at: current, started_from: 0, **opts)
create(:ci_build, create(:ci_build, *traits,
name: name, name: name,
pipeline: pipeline, pipeline: pipeline,
queued_at: queued_at, queued_at: queued_at,
......
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