Commit c7172814 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'revert-23aca014' into 'master'

Revert "Merge branch '210500-missing-merge-conflicts-email-notification' into 'master'"

See merge request gitlab-org/gitlab!28360
parents cd323bb6 1257e1f7
...@@ -189,7 +189,7 @@ class MergeRequest < ApplicationRecord ...@@ -189,7 +189,7 @@ class MergeRequest < ApplicationRecord
end end
# rubocop: disable CodeReuse/ServiceClass # rubocop: disable CodeReuse/ServiceClass
after_transition [:unchecked, :checking] => :cannot_be_merged do |merge_request, transition| after_transition unchecked: :cannot_be_merged do |merge_request, transition|
if merge_request.notify_conflict? if merge_request.notify_conflict?
NotificationService.new.merge_request_unmergeable(merge_request) NotificationService.new.merge_request_unmergeable(merge_request)
TodoService.new.merge_request_became_unmergeable(merge_request) TodoService.new.merge_request_became_unmergeable(merge_request)
......
...@@ -3223,14 +3223,6 @@ describe MergeRequest do ...@@ -3223,14 +3223,6 @@ describe MergeRequest do
subject.mark_as_unmergeable subject.mark_as_unmergeable
end end
it 'notifies conflict, with enabled async mergability check' do
expect(notification_service).to receive(:merge_request_unmergeable).with(subject).once
expect(todo_service).to receive(:merge_request_became_unmergeable).with(subject).once
subject.mark_as_checking
subject.mark_as_unmergeable
end
it 'does not notify whenever merge request is newly unmergeable due to other reasons' do it 'does not notify whenever merge request is newly unmergeable due to other reasons' do
allow(subject.project.repository).to receive(:can_be_merged?).and_return(true) allow(subject.project.repository).to receive(:can_be_merged?).and_return(true)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment