Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <me@douwe.me>2016-01-04 14:11:13 +0300
committerDouwe Maan <me@douwe.me>2016-01-04 14:11:13 +0300
commit25974203b8aa7fcc3fe3b8d283cfbe99e5612908 (patch)
treed84c82acaff94038084791b35cdfc25cc616ed64
parent01824a0fac17331c7eacf40feb6882c508fe4880 (diff)
parent99f3dc50cea61b80353fbc1083b5543e521f598a (diff)
Merge pull request #9938 from huacnlee/hotfix/note_mail_with_notification
Hotfix note mail with notification
-rw-r--r--app/mailers/emails/notes.rb2
-rw-r--r--spec/services/notification_service_spec.rb3
2 files changed, 4 insertions, 1 deletions
diff --git a/app/mailers/emails/notes.rb b/app/mailers/emails/notes.rb
index 65f37e92677..e1382d2da12 100644
--- a/app/mailers/emails/notes.rb
+++ b/app/mailers/emails/notes.rb
@@ -48,7 +48,7 @@ module Emails
yield
- SentNotification.record(@note, recipient_id, reply_key)
+ SentNotification.record_note(@note, recipient_id, reply_key)
end
end
end
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb
index d7a898e85ff..e0af2bbe3c0 100644
--- a/spec/services/notification_service_spec.rb
+++ b/spec/services/notification_service_spec.rb
@@ -52,6 +52,9 @@ describe NotificationService, services: true do
it do
add_users_with_subscription(note.project, issue)
+ # Ensure create SentNotification by noteable = issue 6 times, not noteable = note
+ expect(SentNotification).to receive(:record).with(issue, any_args).exactly(6).times
+
ActionMailer::Base.deliveries.clear
notification.new_note(note)