diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-05-21 00:41:02 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-05-21 00:41:02 +0300 |
commit | baccd1838c92a0d38d3f38b93e9911c97adfef21 (patch) | |
tree | 23e42bfa3f6c30d01aee84f2a8cc6cca2d2eba6f /spec/services/merge_requests/update_service_spec.rb | |
parent | fc1910ddc5db25e608921f69c3dc28d830e6ea03 (diff) | |
parent | 7880a300dc9ef3fcceb7f1a6af6a6500b0b46e5c (diff) |
Merge branch 'rm-source-branch' into 'master'
Allows MR authors to have the source branch removed when merging the MR
closes #13191
The location of the checkbox might not be optimal so any feedback is welcome. Any other feedback too obviously.
Screenshot:
![Screenshot_2016-02-17_21.25.24](/uploads/a9c3eaafb39c6f5b4f0949a2278af6da/Screenshot_2016-02-17_21.25.24.png)
See merge request !2801
Diffstat (limited to 'spec/services/merge_requests/update_service_spec.rb')
-rw-r--r-- | spec/services/merge_requests/update_service_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/services/merge_requests/update_service_spec.rb b/spec/services/merge_requests/update_service_spec.rb index 56ee3e43056..d4ebe28c276 100644 --- a/spec/services/merge_requests/update_service_spec.rb +++ b/spec/services/merge_requests/update_service_spec.rb @@ -39,7 +39,8 @@ describe MergeRequests::UpdateService, services: true do assignee_id: user2.id, state_event: 'close', label_ids: [label.id], - target_branch: 'target' + target_branch: 'target', + force_remove_source_branch: '1' } end @@ -61,6 +62,7 @@ describe MergeRequests::UpdateService, services: true do it { expect(@merge_request.labels.count).to eq(1) } it { expect(@merge_request.labels.first.title).to eq(label.name) } it { expect(@merge_request.target_branch).to eq('target') } + it { expect(@merge_request.merge_params['force_remove_source_branch']).to eq('1') } it 'should execute hooks with update action' do expect(service).to have_received(:execute_hooks). |