diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-07-05 16:16:57 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-07-05 16:16:57 +0300 |
commit | 882e798caf5ac29c8f995922ce942cbe7822fc53 (patch) | |
tree | b1d2cb24113b5a3c269dcfd4b6a2dbd3ba749b1f /spec/services/system_note_service_spec.rb | |
parent | a816bad9a4b37b79c5ba5426bf277a8651099c3f (diff) | |
parent | 587ffd11480db3ed492459ec2b6fac32a459ebaa (diff) |
Merge branch 'make-explicit-endpoint-abort-in-auto-merge-ce' into 'master'
CE Port: Split AutoMergeService interfaces into two `cancel` and `abort`
See merge request gitlab-org/gitlab-ce!30249
Diffstat (limited to 'spec/services/system_note_service_spec.rb')
-rw-r--r-- | spec/services/system_note_service_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb index b934533b1ab..157cfc46e69 100644 --- a/spec/services/system_note_service_spec.rb +++ b/spec/services/system_note_service_spec.rb @@ -359,6 +359,22 @@ describe SystemNoteService do end end + describe '.abort_merge_when_pipeline_succeeds' do + let(:noteable) do + create(:merge_request, source_project: project, target_project: project) + end + + subject { described_class.abort_merge_when_pipeline_succeeds(noteable, project, author, 'merge request was closed') } + + it_behaves_like 'a system note' do + let(:action) { 'merge' } + end + + it "posts the 'merge when pipeline succeeds' system note" do + expect(subject.note).to eq "aborted the automatic merge because merge request was closed" + end + end + describe '.change_title' do let(:noteable) { create(:issue, project: project, title: 'Lorem ipsum') } |