From f4adb50ef2ddac2b49050b312fd79e8960ead301 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 4 Apr 2019 09:01:09 +0000 Subject: Expose head pipeline in the related merge requests Expose head pipeline for the MR in the api when requesting related merge requests for an issue and show a detailed status for the pipeline, which would include: details_path, favicon, group, icon, label, text, tooltip. https://gitlab.com/gitlab-org/gitlab-ce/issues/57662#note_152023412 --- spec/requests/api/pipelines_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'spec/requests/api/pipelines_spec.rb') diff --git a/spec/requests/api/pipelines_spec.rb b/spec/requests/api/pipelines_spec.rb index 52599db9a9e..c26d31c5e0d 100644 --- a/spec/requests/api/pipelines_spec.rb +++ b/spec/requests/api/pipelines_spec.rb @@ -399,6 +399,13 @@ describe API::Pipelines do describe 'GET /projects/:id/pipelines/:pipeline_id' do context 'authorized user' do + it 'exposes known attributes' do + get api("/projects/#{project.id}/pipelines/#{pipeline.id}", user) + + expect(response).to have_gitlab_http_status(200) + expect(response).to match_response_schema('public_api/v4/pipeline/detail') + end + it 'returns project pipelines' do get api("/projects/#{project.id}/pipelines/#{pipeline.id}", user) -- cgit v1.2.1