aboutsummaryrefslogtreecommitdiffstats
path: root/test/JsonTest.js
diff options
context:
space:
mode:
authorIgor Minar2010-08-16 10:56:03 -0700
committerIgor Minar2010-08-16 10:56:03 -0700
commit59401b80ee36d56f7ede551669633abbc6dd1e24 (patch)
tree113669e99faae192d0bb89adc4f74db6f22fefd0 /test/JsonTest.js
parent9899959d695a97ddbb3e9a626a769efa714bffe7 (diff)
parentf09415d0de5d383efc9e2cb35d1323a5aac2371d (diff)
downloadangular.js-59401b80ee36d56f7ede551669633abbc6dd1e24.tar.bz2
Merge remote branch 'upstream/master'
Diffstat (limited to 'test/JsonTest.js')
-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'};