diff options
author | Sean McGivern <sean@gitlab.com> | 2018-03-30 13:25:46 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-03-30 13:25:46 +0100 |
commit | 5ab75649f3ea00b64cb63e7e5283100c6b70cfb5 (patch) | |
tree | c301d3390f5f665640d8f8e931662b28c4242a30 /spec | |
parent | 6412c4c54a7a824e108899a34b1ecec5cbdcec4b (diff) | |
download | gitlab-ce-5ab75649f3ea00b64cb63e7e5283100c6b70cfb5.tar.gz |
Only send issue due emails to participants and custom subscribers
Diffstat (limited to 'spec')
-rw-r--r-- | spec/services/notification_service_spec.rb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb index e7c7706b484..cd10a13814e 100644 --- a/spec/services/notification_service_spec.rb +++ b/spec/services/notification_service_spec.rb @@ -935,16 +935,23 @@ describe NotificationService, :mailer do end describe '#issue_due' do - it 'sends email to issue notification recipients' do + before do + update_custom_notification(:issue_due, @u_guest_custom, resource: project) + update_custom_notification(:issue_due, @u_custom_global) + end + + it 'sends email to issue notification recipients, excluding watchers' do notification.issue_due(issue) should_email(issue.assignees.first) should_email(issue.author) - should_email(@u_watcher) - should_email(@u_guest_watcher) + should_email(@u_guest_custom) + should_email(@u_custom_global) should_email(@u_participant_mentioned) should_email(@subscriber) should_email(@watcher_and_subscriber) + should_not_email(@u_watcher) + should_not_email(@u_guest_watcher) should_not_email(@unsubscriber) should_not_email(@u_participating) should_not_email(@u_disabled) |