Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Chao <mchao@gitlab.com>2018-06-07 17:56:59 +0300
committerMark Chao <mchao@gitlab.com>2018-06-20 18:27:17 +0300
commit5b994b8199a3679b6f5ef0d00edce22ea9662664 (patch)
tree6574c99eb3b963d0518e079f041552bb10367756 /spec/mailers
parent222284a6bf9348b30b5ce2b1b04370163e2120e5 (diff)
Notify only when unmergeable due to conflict
There is still the edge case when 'no commits' changes to 'conflict' would not trigger notification, which we ignore for now. Calling can_be_merged? can cause exception (e.g. non-UTF8) Ignore those by rescueing. Remove unmergeable_reason as now only conflict is notified Update spec
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/notify_spec.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index 775ca4ba0eb..a9a45367b4a 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -416,16 +416,10 @@ describe Notify do
end
it 'has the correct subject and body' do
- reasons = %w[foo bar]
-
- allow_any_instance_of(MergeRequestPresenter).to receive(:unmergeable_reasons).and_return(reasons)
aggregate_failures do
is_expected.to have_referable_subject(merge_request, reply: true)
is_expected.to have_body_text(project_merge_request_path(project, merge_request))
- is_expected.to have_body_text('following reasons:')
- reasons.each do |reason|
- is_expected.to have_body_text(reason)
- end
+ is_expected.to have_body_text('due to conflict.')
end
end
end