diff options
| author | Misko Hevery | 2010-08-14 10:29:50 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-08-14 10:29:50 -0700 |
| commit | 26b5ae410970aab022452b5f0aa7f01a3963623a (patch) | |
| tree | f66f6b34d6f1210fc07440b1206d86821914bdcd /test/JsonTest.js | |
| parent | 14fe8cff2dc8225217de6b5bc553f93308f9490b (diff) | |
| download | angular.js-26b5ae410970aab022452b5f0aa7f01a3963623a.tar.bz2 | |
fix __proto__ for ie.
Diffstat (limited to 'test/JsonTest.js')
| -rw-r--r-- | test/JsonTest.js | 10 |
1 files changed, 5 insertions, 5 deletions
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'}; |
