diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-12-20 09:47:43 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-12-20 09:47:43 +0000 |
commit | 800ab47a53ea1dfaabdb67501360a14322268315 (patch) | |
tree | f6bb2327510806a066cc3776120a2d92b23cc205 /spec/controllers/projects/pipelines_controller_spec.rb | |
parent | 572de0c1c2788d8d434a967f6ef0cb144f7f668f (diff) | |
parent | febb0b9a8014f5b480ff7baab1d189fce49210a5 (diff) | |
download | gitlab-ce-800ab47a53ea1dfaabdb67501360a14322268315.tar.gz |
Merge branch 'master' into 22643-manual-job-page
* master: (50 commits)
Prevent some specs from mangling the gitlab-shell checkout
Line up search dropdown with other nav dropdowns
Fix onion-skin re-entering state
Remove related links in MR widget when empty state
Show inline edit button for issues
Fix tags in the Activity tab not being clickable
Fix shortcut links on help page
Don't link LFS-objects multiple times.
[CE->EE] Fix spec/lib/gitlab/git/gitlab_projects_spec.rb
Tidy up the documentation of Gitlab HA/Gitlab Application
Make sure two except won't overwrite each other
Update axios.md
Remove transitionend event from GL dropdown
Preserve gem path so that we use the same gems
Load commit in batches for pipelines#index
BlobViewer::PackageJson - if private link to homepage
Do not generate links for private NPM modules in blob view
Fix missing WHERE clause in 20171106135924_issues_milestone_id_foreign_key migration
Inverse the has_multiple_clusters? helper usage
Remove block styling from search dropdown
...
Diffstat (limited to 'spec/controllers/projects/pipelines_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/pipelines_controller_spec.rb | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/spec/controllers/projects/pipelines_controller_spec.rb b/spec/controllers/projects/pipelines_controller_spec.rb index 1604a2da485..35ac999cc65 100644 --- a/spec/controllers/projects/pipelines_controller_spec.rb +++ b/spec/controllers/projects/pipelines_controller_spec.rb @@ -17,13 +17,10 @@ describe Projects::PipelinesController do describe 'GET index.json' do before do - branch_head = project.commit - parent = branch_head.parent - - create(:ci_empty_pipeline, status: 'pending', project: project, sha: branch_head.id) - create(:ci_empty_pipeline, status: 'running', project: project, sha: branch_head.id) - create(:ci_empty_pipeline, status: 'created', project: project, sha: parent.id) - create(:ci_empty_pipeline, status: 'success', project: project, sha: parent.id) + %w(pending running created success).each_with_index do |status, index| + sha = project.commit("HEAD~#{index}") + create(:ci_empty_pipeline, status: status, project: project, sha: sha) + end end subject do @@ -46,7 +43,7 @@ describe Projects::PipelinesController do context 'when performing gitaly calls', :request_store do it 'limits the Gitaly requests' do - expect { subject }.to change { Gitlab::GitalyClient.get_request_count }.by(8) + expect { subject }.to change { Gitlab::GitalyClient.get_request_count }.by(3) end end end |