Use ".realm" extension in tests for proper cleanup

This commit is contained in:
Scott Kyle 2016-04-26 00:10:46 -07:00
parent e32df4e815
commit c803efd01b

View File

@ -371,24 +371,24 @@ module.exports = BaseTest.extend({
} }
}; };
new Realm({schema: [NotIndexed], path: '1'}); new Realm({schema: [NotIndexed], path: '1.realm'});
var IndexedSchema = { var IndexedSchema = {
name: 'IndexedSchema', name: 'IndexedSchema',
}; };
TestCase.assertThrows(function() { TestCase.assertThrows(function() {
IndexedSchema.properties = { floatCol: {type: 'float', indexed: true} }; IndexedSchema.properties = { floatCol: {type: 'float', indexed: true} };
new Realm({schema: [IndexedSchema], path: '2'}); new Realm({schema: [IndexedSchema], path: '2.realm'});
}); });
TestCase.assertThrows(function() { TestCase.assertThrows(function() {
IndexedSchema.properties = { doubleCol: {type: 'double', indexed: true} } IndexedSchema.properties = { doubleCol: {type: 'double', indexed: true} }
new Realm({schema: [IndexedSchema], path: '3'}); new Realm({schema: [IndexedSchema], path: '3.realm'});
}); });
TestCase.assertThrows(function() { TestCase.assertThrows(function() {
IndexedSchema.properties = { dataCol: {type: 'data', indexed: true} } IndexedSchema.properties = { dataCol: {type: 'data', indexed: true} }
new Realm({schema: [IndexedSchema], path: '4'}); new Realm({schema: [IndexedSchema], path: '4.realm'});
}); });
// primary key // primary key
@ -396,7 +396,7 @@ module.exports = BaseTest.extend({
IndexedSchema.primaryKey = 'boolCol'; IndexedSchema.primaryKey = 'boolCol';
// Test this doesn't throw // Test this doesn't throw
new Realm({schema: [IndexedSchema], path: '5'}); new Realm({schema: [IndexedSchema], path: '5.realm'});
}, },
testRealmCreateWithDefaults: function() { testRealmCreateWithDefaults: function() {