summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDimitris Karakasilis <jimmykarily@gmail.com>2016-09-26 18:34:56 +0300
committerDimitris Karakasilis <jimmykarily@gmail.com>2016-09-29 14:58:36 +0300
commit6e6f34bffb641ae698177055b8f3528ec41fb7c8 (patch)
treeb4311ff4dc0d84c7baa4bb0cf9096b7228232937 /spec
parentf78c86bbd5c0220e9b408501550a0bfe8f1b5245 (diff)
downloadgitlab-ce-6e6f34bffb641ae698177055b8f3528ec41fb7c8.tar.gz
Notify current_user about automatic merge after successful build
Fixes: https://gitlab.com/gitlab-org/gitlab-ce/issues/14409
Diffstat (limited to 'spec')
-rw-r--r--spec/services/notification_service_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb
index 0d152534c38..d820646ebdf 100644
--- a/spec/services/notification_service_spec.rb
+++ b/spec/services/notification_service_spec.rb
@@ -962,6 +962,20 @@ describe NotificationService, services: true do
should_not_email(@u_lazy_participant)
end
+ it "notifies the merger when merge_when_build_succeeds is true" do
+ merge_request.merge_when_build_succeeds = true
+ notification.merge_mr(merge_request, @u_watcher)
+
+ should_email(@u_watcher)
+ end
+
+ it "does not notify the merger when merge_when_build_succeeds is false" do
+ merge_request.merge_when_build_succeeds = false
+ notification.merge_mr(merge_request, @u_watcher)
+
+ should_not_email(@u_watcher)
+ end
+
context 'participating' do
context 'by assignee' do
before do