summaryrefslogtreecommitdiff
path: root/spec/services/notification_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/notification_service_spec.rb')
-rw-r--r--spec/services/notification_service_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb
index ab0e01e27d7..bd6734634cb 100644
--- a/spec/services/notification_service_spec.rb
+++ b/spec/services/notification_service_spec.rb
@@ -278,6 +278,7 @@ describe NotificationService, :mailer do
notification.new_note(note)
should_email(note.author)
+ expect(find_email_for(note.author)).to have_header('X-GitLab-NotificationReason', 'own_activity')
end
it_behaves_like 'project emails are disabled' do
@@ -335,6 +336,9 @@ describe NotificationService, :mailer do
should_not_email(@u_participating)
should_not_email(@u_disabled)
should_not_email(@u_lazy_participant)
+
+ expect(find_email_for(@u_mentioned)).to have_header('X-GitLab-NotificationReason', 'mentioned')
+ expect(find_email_for(@u_custom_global)).to have_header('X-GitLab-NotificationReason', '')
end
end