Commit f0f7af50 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Reinstate new merge request pipelines hash in API

parent 7733f285
...@@ -245,9 +245,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -245,9 +245,10 @@ class Projects::MergeRequestsController < Projects::ApplicationController
format.json do format.json do
define_pipelines_vars define_pipelines_vars
render json: PipelineSerializer render json: {
pipelines: PipelineSerializer
.new(project: @project, user: @current_user) .new(project: @project, user: @current_user)
.represent(@pipelines) .represent(@pipelines) }
end end
end end
end end
......
...@@ -43,7 +43,8 @@ describe Projects::MergeRequestsController do ...@@ -43,7 +43,8 @@ describe Projects::MergeRequestsController do
submit_new_merge_request(format: :json) submit_new_merge_request(format: :json)
expect(response).to be_ok expect(response).to be_ok
expect(json_response).not_to be_empty expect(json_response).to have_key 'pipelines'
expect(json_response['pipelines']).not_to be_empty
end end
end 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