diff options
author | Felipe Artur <felipefac@gmail.com> | 2017-05-19 17:51:07 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2017-05-22 17:06:45 -0300 |
commit | 921c2be44af6a5a2af2b6e17945f0301c8158214 (patch) | |
tree | 1f2dc10b8661d6f6c95cd97433f1faf6d67b6852 /spec/models/cycle_analytics | |
parent | 9d29eb7e292067fb980b4ca97fc6c3edac1dccec (diff) | |
download | gitlab-ce-921c2be44af6a5a2af2b6e17945f0301c8158214.tar.gz |
Add transient head_pipeline_of to pipeline factoriesissue_32225
Diffstat (limited to 'spec/models/cycle_analytics')
-rw-r--r-- | spec/models/cycle_analytics/test_spec.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/models/cycle_analytics/test_spec.rb b/spec/models/cycle_analytics/test_spec.rb index d0b919efcf9..fd58bd1d6ad 100644 --- a/spec/models/cycle_analytics/test_spec.rb +++ b/spec/models/cycle_analytics/test_spec.rb @@ -13,8 +13,7 @@ describe 'CycleAnalytics#test', feature: true do data_fn: lambda do |context| issue = context.create(:issue, project: context.project) merge_request = context.create_merge_request_closing_issue(issue) - pipeline = context.create(:ci_pipeline, ref: merge_request.source_branch, sha: merge_request.diff_head_sha, project: context.project) - merge_request.update(head_pipeline: pipeline) + pipeline = context.create(:ci_pipeline, ref: merge_request.source_branch, sha: merge_request.diff_head_sha, project: context.project, head_pipeline_of: merge_request) { pipeline: pipeline, issue: issue } end, start_time_conditions: [["pipeline is started", -> (context, data) { data[:pipeline].run! }]], |