diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-06-04 11:24:07 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-06-04 11:24:07 +0000 |
commit | 5d2595da56f911ad30aaa7d7b2603d8bd640adb8 (patch) | |
tree | 7923283a15f64202db92bdd33b48a3f55fd594e2 /spec/services | |
parent | 0b864208e44a1ab44754926f1d1529479387b360 (diff) | |
parent | 9b91e6816ce6b7544856fd2b52049836b5e2d250 (diff) | |
download | gitlab-ce-5d2595da56f911ad30aaa7d7b2603d8bd640adb8.tar.gz |
Merge branch 'cancel-auto-merge-when-merge-request-is-closed' into 'master'
Cancel auto merge when merge request is closed
See merge request gitlab-org/gitlab-ce!28782
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/merge_requests/close_service_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/services/merge_requests/close_service_spec.rb b/spec/services/merge_requests/close_service_spec.rb index ffa612cf315..29b7e0f17e2 100644 --- a/spec/services/merge_requests/close_service_spec.rb +++ b/spec/services/merge_requests/close_service_spec.rb @@ -52,6 +52,14 @@ describe MergeRequests::CloseService do it 'marks todos as done' do expect(todo.reload).to be_done end + + context 'when auto merge is enabled' do + let(:merge_request) { create(:merge_request, :merge_when_pipeline_succeeds) } + + it 'cancels the auto merge' do + expect(@merge_request).not_to be_auto_merge_enabled + end + end end it 'updates metrics' do |