Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix note mail with notification #9938

Merged
merged 2 commits into from Jan 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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