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:
authorJason Lee <huacnlee@gmail.com>2015-12-31 06:14:19 +0300
committerJason Lee <huacnlee@gmail.com>2015-12-31 06:50:54 +0300
commit99f3dc50cea61b80353fbc1083b5543e521f598a (patch)
treed84c82acaff94038084791b35cdfc25cc616ed64
parent94d0b15aca4282d4edba8bca3902e88478803521 (diff)
Add test case for make sure SentNotification save a correct noteable value;
-rw-r--r--spec/services/notification_service_spec.rb3
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)