Remove duplicated test in ArrayTests.js
This must have been accidentally copy-pasted from ObjectTests.js
This commit is contained in:
parent
4cfa8eae7b
commit
515ece8fdd
|
@ -19,37 +19,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var ArrayTests = {
|
var ArrayTests = {
|
||||||
testLinkTypesPropertySetters: function() {
|
|
||||||
var realm = new Realm({schema: [LinkTypesObjectSchema, TestObjectSchema]});
|
|
||||||
var obj = null;
|
|
||||||
realm.write(function() {
|
|
||||||
obj = realm.create('LinkTypesObject', [[1], undefined, [[3]]]);
|
|
||||||
});
|
|
||||||
TestCase.assertEqual(realm.objects('TestObject').length, 2);
|
|
||||||
|
|
||||||
// set/reuse object property
|
|
||||||
realm.write(function() {
|
|
||||||
obj.objectCol1 = obj.objectCol;
|
|
||||||
});
|
|
||||||
TestCase.assertEqual(obj.objectCol1.doubleCol, 1);
|
|
||||||
//TestCase.assertEqual(obj.objectCol, obj.objectCol1);
|
|
||||||
TestCase.assertEqual(realm.objects('TestObject').length, 2);
|
|
||||||
|
|
||||||
realm.write(function() {
|
|
||||||
obj.objectCol = undefined;
|
|
||||||
obj.objectCol1 = null;
|
|
||||||
});
|
|
||||||
TestCase.assertEqual(obj.objectCol, null);
|
|
||||||
TestCase.assertEqual(obj.objectCol1, null);
|
|
||||||
|
|
||||||
// set object as JSON
|
|
||||||
realm.write(function() {
|
|
||||||
obj.objectCol = { doubleCol: 3 };
|
|
||||||
});
|
|
||||||
TestCase.assertEqual(obj.objectCol.doubleCol, 3);
|
|
||||||
TestCase.assertEqual(realm.objects('TestObject').length, 3);
|
|
||||||
},
|
|
||||||
|
|
||||||
testArrayLength: function() {
|
testArrayLength: function() {
|
||||||
var realm = new Realm({schema: [LinkTypesObjectSchema, TestObjectSchema]});
|
var realm = new Realm({schema: [LinkTypesObjectSchema, TestObjectSchema]});
|
||||||
realm.write(function() {
|
realm.write(function() {
|
||||||
|
|
Loading…
Reference in New Issue