Commit 99f3dc50 authored by Jason Lee's avatar Jason Lee

Add test case for make sure SentNotification save a correct noteable value;

parent 94d0b15a
...@@ -52,6 +52,9 @@ describe NotificationService, services: true do ...@@ -52,6 +52,9 @@ describe NotificationService, services: true do
it do it do
add_users_with_subscription(note.project, issue) 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 ActionMailer::Base.deliveries.clear
notification.new_note(note) notification.new_note(note)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment