Add tests for closed-realm access protection

This commit is contained in:
Kristian Dupont 2016-12-05 16:57:36 +01:00 committed by Ari Lazier
parent 50d8a55d3f
commit bf85c285a0

View File

@ -654,6 +654,18 @@ module.exports = {
TestCase.assertThrows(function() {
realm.objects(InvalidPerson);
});
var person = realm.objects('PersonObject')[0];
realm.close();
TestCase.assertThrows(function() {
console.log("Name: ", person.name);
});
TestCase.assertThrows(function() {
realm.objects('PersonObject');
});
},
testRealmObjectForPrimaryKey: function() {