Small improvement to notifications test
This commit is contained in:
parent
290234cb8a
commit
6a550f285f
|
@ -272,14 +272,19 @@ var RealmTests = {
|
|||
},
|
||||
|
||||
testNotifications: function() {
|
||||
var notificationCount = 0;
|
||||
var realm = new Realm({schema: []});
|
||||
var notification = realm.addNotification(function() {
|
||||
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');
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue