From 26b5ae410970aab022452b5f0aa7f01a3963623a Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Sat, 14 Aug 2010 10:29:50 -0700 Subject: fix __proto__ for ie. --- test/JsonTest.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/JsonTest.js') diff --git a/test/JsonTest.js b/test/JsonTest.js index d077c0df..f6da26b5 100644 --- a/test/JsonTest.js +++ b/test/JsonTest.js @@ -75,11 +75,11 @@ JsonTest.prototype.testItShouldPreventRecursion = function () { }; JsonTest.prototype.testItShouldSerializeOnlyOwnProperties = function() { - var parent = { p: 'p'}; - var child = { c: 'c'}; - child.__proto__ = parent; - assertEquals('{"c":"c"}', angular.toJson(child)); -} + var parent = createScope(); + var child = createScope(parent); + child.c = 'c'; + expect(angular.toJson(child)).toEqual('{"c":"c"}'); +}; JsonTest.prototype.testItShouldSerializeSameObjectsMultipleTimes = function () { var obj = {a:'b'}; -- cgit v1.2.3