aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/JsonTest.js10
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'};