add tests
This commit is contained in:
parent
324c3d702b
commit
5de63ac401
|
@ -117,6 +117,16 @@ module.exports = BaseTest.extend({
|
|||
TestCase.assertEqual(Realm.defaultPath, newPath, "defaultPath should have been updated");
|
||||
},
|
||||
|
||||
testRealmSchemaVersion: function() {
|
||||
TestCase.assertEqual(Realm.schemaVersion(Realm.defaultPath), 0xFFFFFFFFFFFFFFFF);
|
||||
|
||||
var realm = new Realm({schema: []});
|
||||
TestCase.assertEqual(Realm.schemaVersion(Realm.defaultPath), 0);
|
||||
|
||||
realm = new Realm({schema: [], schemaVersion: 2, path: 'another.realm'});
|
||||
TestCase.assertEqual(Realm.schemaVersion('another.realm'), 2);
|
||||
},
|
||||
|
||||
testRealmCreate: function() {
|
||||
var realm = new Realm({schema: [schemas.IntPrimary, schemas.AllTypes, schemas.TestObject]});
|
||||
|
||||
|
|
Loading…
Reference in New Issue