From cc294e0353e62bb5b78482012adc597c57ac6cf0 Mon Sep 17 00:00:00 2001 From: Scott Kyle Date: Mon, 12 Oct 2015 12:59:40 -0700 Subject: [PATCH] Move object property setter assert downward --- tests/ObjectTests.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/ObjectTests.js b/tests/ObjectTests.js index 1331e9ad..3c84ecb3 100644 --- a/tests/ObjectTests.js +++ b/tests/ObjectTests.js @@ -56,10 +56,6 @@ var ObjectTests = { obj.dataCol = 'b'; }); - TestCase.assertThrows(function() { - obj.boolCol = true; - }, 'can only set property values in a write transaction'); - TestCase.assertEqual(obj.boolCol, false, 'wrong bool value'); TestCase.assertEqual(obj.intCol, 2, 'wrong int value'); TestCase.assertEqualWithTolerance(obj.floatCol, 2.2, 0.000001, 'wrong float value'); @@ -67,6 +63,12 @@ var ObjectTests = { TestCase.assertEqual(obj.stringCol, 'STRING', 'wrong string value'); TestCase.assertEqual(obj.dateCol.getTime(), 2, 'wrong date value'); TestCase.assertEqual(obj.dataCol, 'b', 'wrong data value'); + + TestCase.assertThrows(function() { + obj.boolCol = true; + }, 'can only set property values in a write transaction'); + + TestCase.assertEqual(obj.boolCol, false, 'bool value changed outside transaction'); }, testLinkTypesPropertyGetters: function() { var realm = new Realm({schema: [LinkTypesObjectSchema, TestObjectSchema]});