Skip to content
Snippets Groups Projects
Commit 23e4ad52 authored by Oswaldo Ferreira's avatar Oswaldo Ferreira Committed by Dennis Tang
Browse files

Adjust permitted params filtering on merge scheduling

parent da9cc1b9
No related branches found
No related tags found
2 merge requests!6393CE upstream - 2018-07-05 12:27 UTC,!6387Prepare 11.1 RC5 EE release
......@@ -296,14 +296,14 @@ def merge!
elsif @merge_request.actual_head_pipeline.success?
# This can be triggered when a user clicks the auto merge button while
# the tests finish at about the same time
@merge_request.merge_async(current_user.id, params)
@merge_request.merge_async(current_user.id, merge_params)
:success
else
:failed
end
else
@merge_request.merge_async(current_user.id, params)
@merge_request.merge_async(current_user.id, merge_params)
:success
end
......
---
title: Adjust permitted params filtering on merge scheduling
merge_request:
author:
type: fixed
......@@ -326,8 +326,8 @@ def merge_with_sha(params = {})
expect(json_response).to eq('status' => 'success')
end
it 'starts the merge immediately' do
expect(MergeWorker).to receive(:perform_async).with(merge_request.id, anything, anything)
it 'starts the merge immediately with permitted params' do
expect(MergeWorker).to receive(:perform_async).with(merge_request.id, anything, { 'squash' => false })
merge_with_sha
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment