Merge branch 'rails5-fix-48104' into 'master'
Rails5 fix expected: 1 time with arguments: (97, anything, {"squash"=>false}) received: 0 times Closes #48104 See merge request gitlab-org/gitlab-ce!20004
This commit is contained in:
commit
a88a9e22c5
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: 'Rails5 fix expected: 1 time with arguments: (97, anything, {"squash"=>false})
|
||||||
|
received: 0 times'
|
||||||
|
merge_request: 20004
|
||||||
|
author: Jasper Maes
|
||||||
|
type: fixed
|
|
@ -337,7 +337,12 @@ describe Projects::MergeRequestsController do
|
||||||
|
|
||||||
context 'when the sha parameter matches the source SHA' do
|
context 'when the sha parameter matches the source SHA' do
|
||||||
def merge_with_sha(params = {})
|
def merge_with_sha(params = {})
|
||||||
post :merge, base_params.merge(sha: merge_request.diff_head_sha).merge(params)
|
post_params = base_params.merge(sha: merge_request.diff_head_sha).merge(params)
|
||||||
|
if Gitlab.rails5?
|
||||||
|
post :merge, params: post_params, as: :json
|
||||||
|
else
|
||||||
|
post :merge, post_params
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns :success' do
|
it 'returns :success' do
|
||||||
|
|
Loading…
Reference in New Issue