diff options
author | Rémy Coutable <remy@rymai.me> | 2016-10-13 13:19:56 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-10-13 13:19:56 +0000 |
commit | b3e989b057ff9cd1973f0927b4b0f0d28b1e0c6b (patch) | |
tree | 05fb4bf893259319bef3b229eb72724191b3ac29 /spec/services/merge_requests | |
parent | 2362dfee686ab715ef6a3bd00b389ab321e7a728 (diff) | |
parent | 3c476ee62512a0642ca3e5e6b228f9abdd867a34 (diff) | |
download | gitlab-ce-b3e989b057ff9cd1973f0927b4b0f0d28b1e0c6b.tar.gz |
Merge branch '23234-deleting-a-milestone-removes-source-branch-deletion-options-of-associated-merge-requests' into 'master'
Maintain "force_remove_source_branch" options on Merge Request unless specified
## What does this MR do?
Fixes a problem where Merge Requests were losing the state associated with the flag to remove the source branch upon merge
* Closes #23234
* Closes #23191
* Closes #19351
See merge request !6817
Diffstat (limited to 'spec/services/merge_requests')
-rw-r--r-- | spec/services/merge_requests/update_service_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/merge_requests/update_service_spec.rb b/spec/services/merge_requests/update_service_spec.rb index fd5f94047c2..2433a7dad06 100644 --- a/spec/services/merge_requests/update_service_spec.rb +++ b/spec/services/merge_requests/update_service_spec.rb @@ -105,6 +105,18 @@ describe MergeRequests::UpdateService, services: true do expect(note).not_to be_nil expect(note.note).to eq 'Target branch changed from `master` to `target`' end + + context 'when not including source branch removal options' do + before do + opts.delete(:force_remove_source_branch) + end + + it 'maintains the original options' do + update_merge_request(opts) + + expect(@merge_request.merge_params["force_remove_source_branch"]).to eq("1") + end + end end context 'todos' do |