diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-06 12:24:46 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-04-06 12:24:46 +0200 |
commit | 6d7a52480ccb291de1f9341ed37232fd40b58415 (patch) | |
tree | caef6088995ed8bb067c74d39be036b05695bcbd /spec/requests/api/runner_spec.rb | |
parent | 714c408f222cc3bfef577b477f7bab0556f50599 (diff) | |
parent | aaa49c2c4e9473726814e3ce183c2e3e4072d64b (diff) | |
download | gitlab-ce-6d7a52480ccb291de1f9341ed37232fd40b58415.tar.gz |
Merge branch 'master' into feature/multi-level-container-registry-images
* master: (94 commits)
Merge branch 'open-redirect-fix-continue-to' into 'security'
Merge branch 'open-redirect-host-fix' into 'security'
Merge branch 'path-disclosure-proj-import-export' into 'security'
Merge branch '29364-private-projects-mr-fix'
Merge branch '30125-markdown-security'
Issue title realtime
Update CHANGELOG.md for 8.16.9
Update CHANGELOG.md for 8.17.5
Update CHANGELOG.md for 9.0.4
Add "search" optional param and docs for V4
Use PDFLab to render PDFs in GitLab
Separate Scala from Java in CI examples
Fix broken link
Reorganize CI examples, add more links
Refactor CI index page
Remove deprecated field from workhorse response
Use gitlab-workhorse 1.4.3
Document how ETag caching middleware handles query parameters
Make group skip validation in the frontend
Use NamespaceValidator::WILDCARD_ROUTES in ETag caching middleware
...
Diffstat (limited to 'spec/requests/api/runner_spec.rb')
-rw-r--r-- | spec/requests/api/runner_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb index 044b989e5ba..1cfac7353d4 100644 --- a/spec/requests/api/runner_spec.rb +++ b/spec/requests/api/runner_spec.rb @@ -461,6 +461,29 @@ describe API::Runner do end end + context 'when dependencies is an empty array' do + let!(:job) { create(:ci_build_tag, pipeline: pipeline, name: 'spinach', stage: 'test', stage_idx: 0) } + let!(:job2) { create(:ci_build_tag, pipeline: pipeline, name: 'rubocop', stage: 'test', stage_idx: 0) } + let!(:empty_dependencies_job) do + create(:ci_build, pipeline: pipeline, token: 'test-job-token', name: 'empty_dependencies_job', + stage: 'deploy', stage_idx: 1, + options: { dependencies: [] }) + end + + before do + job.success + job2.success + end + + it 'returns an empty array' do + request_job + + expect(response).to have_http_status(201) + expect(json_response['id']).to eq(empty_dependencies_job.id) + expect(json_response['dependencies'].count).to eq(0) + end + end + context 'when job has no tags' do before { job.update(tags: []) } |