From 921c2be44af6a5a2af2b6e17945f0301c8158214 Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Fri, 19 May 2017 17:51:07 -0300 Subject: Add transient head_pipeline_of to pipeline factories --- spec/features/cycle_analytics_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'spec/features/cycle_analytics_spec.rb') diff --git a/spec/features/cycle_analytics_spec.rb b/spec/features/cycle_analytics_spec.rb index cbeb73d9cae..1c829e91c20 100644 --- a/spec/features/cycle_analytics_spec.rb +++ b/spec/features/cycle_analytics_spec.rb @@ -7,7 +7,7 @@ feature 'Cycle Analytics', feature: true, js: true do let(:issue) { create(:issue, project: project, created_at: 2.days.ago) } let(:milestone) { create(:milestone, project: project) } let(:mr) { create_merge_request_closing_issue(issue, commit_message: "References #{issue.to_reference}") } - let(:pipeline) { create(:ci_empty_pipeline, status: 'created', project: project, ref: mr.source_branch, sha: mr.source_branch_sha) } + let(:pipeline) { create(:ci_empty_pipeline, status: 'created', project: project, ref: mr.source_branch, sha: mr.source_branch_sha, head_pipeline_of: mr) } context 'as an allowed user' do context 'when project is new' do @@ -33,7 +33,6 @@ feature 'Cycle Analytics', feature: true, js: true do context "when there's cycle analytics data" do before do allow_any_instance_of(Gitlab::ReferenceExtractor).to receive(:issues).and_return([issue]) - mr.update(head_pipeline: pipeline) project.add_master(user) create_cycle -- cgit v1.2.1