diff options
author | Jason Lee <huacnlee@gmail.com> | 2015-12-31 06:14:19 +0300 |
---|---|---|
committer | Jason Lee <huacnlee@gmail.com> | 2015-12-31 06:50:54 +0300 |
commit | 99f3dc50cea61b80353fbc1083b5543e521f598a (patch) | |
tree | d84c82acaff94038084791b35cdfc25cc616ed64 | |
parent | 94d0b15aca4282d4edba8bca3902e88478803521 (diff) |
Add test case for make sure SentNotification save a correct noteable value;
-rw-r--r-- | spec/services/notification_service_spec.rb | 3 |
1 files changed, 3 insertions, 0 deletions
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) |