diff options
author | Felipe Artur <felipefac@gmail.com> | 2017-03-22 16:36:14 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2017-05-08 11:26:04 -0300 |
commit | 24824cbb4c6d2c5ebd08dea03007f65c5df763da (patch) | |
tree | 618cc1a50e76126e4aff941bd538a31917e5282b /spec/services/merge_requests/update_service_spec.rb | |
parent | 85f0b3a984048d1e5d146a233612a0bc96f12b5c (diff) | |
download | gitlab-ce-24824cbb4c6d2c5ebd08dea03007f65c5df763da.tar.gz |
Fix Specs
Diffstat (limited to 'spec/services/merge_requests/update_service_spec.rb')
-rw-r--r-- | spec/services/merge_requests/update_service_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/services/merge_requests/update_service_spec.rb b/spec/services/merge_requests/update_service_spec.rb index 31487c0f794..e5071c2f447 100644 --- a/spec/services/merge_requests/update_service_spec.rb +++ b/spec/services/merge_requests/update_service_spec.rb @@ -174,11 +174,13 @@ describe MergeRequests::UpdateService, services: true do context 'with active pipeline' do before do service_mock = double - create(:ci_pipeline_with_one_job, + pipeline = create(:ci_pipeline_with_one_job, project: project, ref: merge_request.source_branch, sha: merge_request.diff_head_sha) + merge_request.update(head_pipeline_id: pipeline.id) + expect(MergeRequests::MergeWhenPipelineSucceedsService).to receive(:new).with(project, user). and_return(service_mock) expect(service_mock).to receive(:execute).with(merge_request) |