Skip to content

Commit

Permalink
Merge branch 'pr-9938' into 'master'
Browse files Browse the repository at this point in the history
Merge pull request GH-9938 from huacnlee/hotfix/note_mail_with_notification

Hotfix note mail with notification

See merge request !2288
  • Loading branch information
Douwe Maan committed Jan 5, 2016
2 parents a7c4245 + 12ce1cb commit 2479af4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/mailers/emails/notes.rb
Expand Up @@ -48,7 +48,7 @@ def note_mail_with_notification(note_id, recipient_id)

yield

SentNotification.record(@note, recipient_id, reply_key)
SentNotification.record_note(@note, recipient_id, reply_key)
end
end
end
3 changes: 3 additions & 0 deletions spec/services/notification_service_spec.rb
Expand Up @@ -52,6 +52,9 @@
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)
Expand Down

0 comments on commit 2479af4

Please sign in to comment.