Commit dbf235f5 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix tests failures

parent 4e38d88d
...@@ -5,7 +5,7 @@ module Ci ...@@ -5,7 +5,7 @@ module Ci
end end
def execute(stage, user, status, trigger_request = nil) def execute(stage, user, status, trigger_request = nil)
builds_attrs = config_processor.builds_for_stage_and_ref(stage, @commit.ref, @commit.tag, trigger_request) builds_attrs = config_processor.builds_for_stage_and_ref(stage, @pipeline.ref, @pipeline.tag, trigger_request)
# check when to create next build # check when to create next build
builds_attrs = builds_attrs.select do |build_attrs| builds_attrs = builds_attrs.select do |build_attrs|
......
...@@ -219,7 +219,7 @@ describe Ci::Build, models: true do ...@@ -219,7 +219,7 @@ describe Ci::Build, models: true do
context 'and trigger variables' do context 'and trigger variables' do
let(:trigger) { create(:ci_trigger, project: project) } let(:trigger) { create(:ci_trigger, project: project) }
let(:trigger_request) { create(:ci_trigger_request_with_variables, pipeline: pipeline, trigger: trigger) } let(:trigger_request) { create(:ci_trigger_request_with_variables, commit: pipeline, trigger: trigger) }
let(:trigger_variables) do let(:trigger_variables) do
[ [
{ key: :TRIGGER_KEY, value: 'TRIGGER_VALUE', public: false } { key: :TRIGGER_KEY, value: 'TRIGGER_VALUE', public: false }
......
...@@ -401,7 +401,7 @@ describe Project, models: true do ...@@ -401,7 +401,7 @@ describe Project, models: true do
describe :pipeline do describe :pipeline do
let(:project) { create :project } let(:project) { create :project }
let(:pipeline) { create :pipeline, project: project, ref: 'master' } let(:pipeline) { create :ci_pipeline, project: project, ref: 'master' }
subject { project.pipeline(pipeline.sha, 'master') } subject { project.pipeline(pipeline.sha, 'master') }
......
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