From 6a550f285f0adfef51d806c8bd99533f561bf904 Mon Sep 17 00:00:00 2001 From: Scott Kyle Date: Mon, 12 Oct 2015 23:19:54 -0700 Subject: [PATCH] Small improvement to notifications test --- tests/RealmTests.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/RealmTests.js b/tests/RealmTests.js index bb60f2b3..8773f581 100644 --- a/tests/RealmTests.js +++ b/tests/RealmTests.js @@ -272,14 +272,19 @@ var RealmTests = { }, testNotifications: function() { - var notificationCount = 0; var realm = new Realm({schema: []}); - var notification = realm.addNotification(function() { - notificationCount++; + var notificationCount = 0; + var notificationName; + + var notification = realm.addNotification(function(realm, name) { + notificationCount++; + notificationName = name; }); + TestCase.assertEqual(notificationCount, 0); realm.write(function() {}); TestCase.assertEqual(notificationCount, 1); + TestCase.assertEqual(notificationName, 'DidChangeNotification'); }, };