diff options
author | John T Skarbek <jtslear@gmail.com> | 2019-04-04 17:51:52 +0300 |
---|---|---|
committer | John T Skarbek <jtslear@gmail.com> | 2019-04-04 17:51:52 +0300 |
commit | b6ff795870c7ed06c18c018cc0103d8ded4daec8 (patch) | |
tree | 77f6991b55c46f8666425ecee72497b25cf32758 /spec/requests/api/merge_requests_spec.rb | |
parent | 7de4c89396a739eee90db3eebd75818e8cc4b9ef (diff) | |
parent | b99b6bb0960f749e1ba9a129be9c0365e306ed96 (diff) |
Merge commit 'b99b6bb0960f749e1ba9a129be9c0365e306ed96' into 11-10-stable
Diffstat (limited to 'spec/requests/api/merge_requests_spec.rb')
-rw-r--r-- | spec/requests/api/merge_requests_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb index 1d139200535..7ffa365c651 100644 --- a/spec/requests/api/merge_requests_spec.rb +++ b/spec/requests/api/merge_requests_spec.rb @@ -1361,7 +1361,12 @@ describe API::MergeRequests do end it 'returns 405 if the build failed for a merge request that requires success' do - allow_any_instance_of(MergeRequest).to receive(:mergeable_ci_state?).and_return(false) + project.update!(only_allow_merge_if_pipeline_succeeds: true) + + create(:ci_pipeline, + :failed, + sha: merge_request.diff_head_sha, + merge_requests_as_head_pipeline: [merge_request]) put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/merge", user) |