Commit bd8dc9b5 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Make it clear that downstream trigger needs project path

parent 91a67a79
......@@ -27,7 +27,7 @@ module EE
self.user
end
def target_project_name
def target_project_path
options&.dig(:trigger, :project)
end
......
......@@ -58,7 +58,7 @@ module Ci
def target_project
strong_memoize(:target_project) do
Project.find_by_full_path(@bridge.target_project_name)
Project.find_by_full_path(@bridge.target_project_path)
end
end
end
......
......@@ -32,10 +32,10 @@ describe Ci::Bridge do
end
end
describe '#target_project_name' do
describe '#target_project_path' do
context 'when trigger is defined' do
it 'returns a full path of a project' do
expect(bridge.target_project_name).to eq 'my/project'
expect(bridge.target_project_path).to eq 'my/project'
end
end
......@@ -43,7 +43,7 @@ describe Ci::Bridge do
let(:options) { { trigger: {} } }
it 'returns nil' do
expect(bridge.target_project_name).to be_nil
expect(bridge.target_project_path).to be_nil
end
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