Commit a88a9e22 authored by Rémy Coutable's avatar Rémy Coutable

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
parents 52b9cead 9214e273
---
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 ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment