diff options
author | Felipe Artur <felipefac@gmail.com> | 2017-05-19 23:51:07 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2017-05-22 23:06:45 +0300 |
commit | 921c2be44af6a5a2af2b6e17945f0301c8158214 (patch) | |
tree | 1f2dc10b8661d6f6c95cd97433f1faf6d67b6852 /spec/services/merge_requests/update_service_spec.rb | |
parent | 9d29eb7e292067fb980b4ca97fc6c3edac1dccec (diff) |
Add transient head_pipeline_of to pipeline factories
Diffstat (limited to 'spec/services/merge_requests/update_service_spec.rb')
-rw-r--r-- | spec/services/merge_requests/update_service_spec.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/services/merge_requests/update_service_spec.rb b/spec/services/merge_requests/update_service_spec.rb index 860a7798857..d371fc68312 100644 --- a/spec/services/merge_requests/update_service_spec.rb +++ b/spec/services/merge_requests/update_service_spec.rb @@ -180,12 +180,13 @@ describe MergeRequests::UpdateService, services: true do context 'with active pipeline' do before do service_mock = double - pipeline = create(:ci_pipeline_with_one_job, + create( + :ci_pipeline_with_one_job, project: project, - ref: merge_request.source_branch, - sha: merge_request.diff_head_sha) - - merge_request.update(head_pipeline: pipeline) + ref: merge_request.source_branch, + sha: merge_request.diff_head_sha, + head_pipeline_of: merge_request + ) expect(MergeRequests::MergeWhenPipelineSucceedsService).to receive(:new).with(project, user). and_return(service_mock) |