diff options
author | Sean McGivern <sean@gitlab.com> | 2019-08-29 20:20:03 +0100 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-09-02 12:15:24 -0500 |
commit | 075f6d3559f0a0127fb322b40fad7985df621fcd (patch) | |
tree | c45e8aee6c8954f7b7d8e81d2c0b1d9aee0d3be0 /spec/services/notification_service_spec.rb | |
parent | d3076322f230cea1f60a7e27d7ae6e1fb770234a (diff) | |
download | gitlab-ce-075f6d3559f0a0127fb322b40fad7985df621fcd.tar.gz |
Add X-GitLab-NotificationReason header to note emailsadd-notification-reason-to-note-emails
The 'assigned' reason doesn't apply to notes, but the other two
can ('mentioned' and 'own_activity'), so we can still use this for note
emails.
Diffstat (limited to 'spec/services/notification_service_spec.rb')
-rw-r--r-- | spec/services/notification_service_spec.rb | 4 |
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 |