diff options
author | Dimitris Karakasilis <jimmykarily@gmail.com> | 2016-09-26 18:34:56 +0300 |
---|---|---|
committer | Dimitris Karakasilis <jimmykarily@gmail.com> | 2016-09-29 14:58:36 +0300 |
commit | 6e6f34bffb641ae698177055b8f3528ec41fb7c8 (patch) | |
tree | b4311ff4dc0d84c7baa4bb0cf9096b7228232937 /spec | |
parent | f78c86bbd5c0220e9b408501550a0bfe8f1b5245 (diff) | |
download | gitlab-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.rb | 14 |
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 |