summaryrefslogtreecommitdiff
path: root/spec/requests/api/pipelines_spec.rb
diff options
context:
space:
mode:
authorAlexandru Croitor <acroitor@gitlab.com>2019-04-04 09:01:09 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2019-04-04 09:01:09 +0000
commitf4adb50ef2ddac2b49050b312fd79e8960ead301 (patch)
treeb1110bebe127f8d913bd332ef6019b8d333f4a49 /spec/requests/api/pipelines_spec.rb
parentcdce2074c782c44c12c0421a0d7306a286388315 (diff)
downloadgitlab-ce-f4adb50ef2ddac2b49050b312fd79e8960ead301.tar.gz
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
Diffstat (limited to 'spec/requests/api/pipelines_spec.rb')
-rw-r--r--spec/requests/api/pipelines_spec.rb7
1 files changed, 7 insertions, 0 deletions
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)