Remove trigger_request.trigger.owner
This commit is contained in:
parent
84ab8a716f
commit
815483b389
|
@ -15,7 +15,7 @@ module Ci
|
|||
pipeline_schedule: schedule
|
||||
)
|
||||
|
||||
result = validate(current_user || trigger_request.trigger.owner,
|
||||
result = validate(current_user,
|
||||
ignore_skip_ci: ignore_skip_ci,
|
||||
save_on_errors: save_on_errors)
|
||||
|
||||
|
|
|
@ -84,21 +84,21 @@ describe API::Triggers do
|
|||
expect(pipeline.variables.map { |v| { v.key => v.value } }.last).to eq(variables)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when legacy trigger' do
|
||||
before do
|
||||
trigger.update(owner: nil)
|
||||
end
|
||||
context 'when legacy trigger' do
|
||||
before do
|
||||
trigger.update(owner: nil)
|
||||
end
|
||||
|
||||
it 'creates pipeline' do
|
||||
post api("/projects/#{project.id}/trigger/pipeline"), options.merge(ref: 'master')
|
||||
it 'creates pipeline' do
|
||||
post api("/projects/#{project.id}/trigger/pipeline"), options.merge(ref: 'master')
|
||||
|
||||
expect(response).to have_http_status(201)
|
||||
expect(json_response).to include('id' => pipeline.id)
|
||||
pipeline.builds.reload
|
||||
expect(pipeline.builds.pending.size).to eq(2)
|
||||
expect(pipeline.builds.size).to eq(5)
|
||||
expect(response).to have_http_status(201)
|
||||
expect(json_response).to include('id' => pipeline.id)
|
||||
pipeline.builds.reload
|
||||
expect(pipeline.builds.pending.size).to eq(2)
|
||||
expect(pipeline.builds.size).to eq(5)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue