summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/cycle_analytics
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2017-05-19 17:51:07 -0300
committerFelipe Artur <felipefac@gmail.com>2017-05-22 17:06:45 -0300
commit921c2be44af6a5a2af2b6e17945f0301c8158214 (patch)
tree1f2dc10b8661d6f6c95cd97433f1faf6d67b6852 /spec/lib/gitlab/cycle_analytics
parent9d29eb7e292067fb980b4ca97fc6c3edac1dccec (diff)
downloadgitlab-ce-921c2be44af6a5a2af2b6e17945f0301c8158214.tar.gz
Add transient head_pipeline_of to pipeline factoriesissue_32225
Diffstat (limited to 'spec/lib/gitlab/cycle_analytics')
-rw-r--r--spec/lib/gitlab/cycle_analytics/events_spec.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/lib/gitlab/cycle_analytics/events_spec.rb b/spec/lib/gitlab/cycle_analytics/events_spec.rb
index 3610a0354e8..a1b3fe8509e 100644
--- a/spec/lib/gitlab/cycle_analytics/events_spec.rb
+++ b/spec/lib/gitlab/cycle_analytics/events_spec.rb
@@ -126,12 +126,11 @@ describe 'cycle analytics events' do
create(:ci_pipeline,
ref: merge_request.source_branch,
sha: merge_request.diff_head_sha,
- project: context.project)
+ project: context.project,
+ head_pipeline_of: merge_request)
end
before do
- merge_request.update(head_pipeline: pipeline)
-
create(:ci_build, pipeline: pipeline, status: :success, author: user)
create(:ci_build, pipeline: pipeline, status: :success, author: user)
@@ -224,12 +223,11 @@ describe 'cycle analytics events' do
create(:ci_pipeline,
ref: merge_request.source_branch,
sha: merge_request.diff_head_sha,
- project: context.project)
+ project: context.project,
+ head_pipeline_of: merge_request)
end
before do
- merge_request.update(head_pipeline: pipeline)
-
create(:ci_build, pipeline: pipeline, status: :success, author: user)
create(:ci_build, pipeline: pipeline, status: :success, author: user)