diff options
| author | Misko Hevery | 2010-08-14 10:26:09 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-08-14 10:26:09 -0700 |
| commit | 14fe8cff2dc8225217de6b5bc553f93308f9490b (patch) | |
| tree | 23b131fdc9f23f450e913a57d432aee92f81987d /test/JsonTest.js | |
| parent | 791b13d1618f0773f366738094df0b78f4bc20d8 (diff) | |
| parent | 7159b30752f63ad8a127101cbc10d7e672ae1620 (diff) | |
| download | angular.js-14fe8cff2dc8225217de6b5bc553f93308f9490b.tar.bz2 | |
Merge remote branch 'igor/master'
Diffstat (limited to 'test/JsonTest.js')
| -rw-r--r-- | test/JsonTest.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/JsonTest.js b/test/JsonTest.js index 4afb7743..d077c0df 100644 --- a/test/JsonTest.js +++ b/test/JsonTest.js @@ -74,6 +74,13 @@ JsonTest.prototype.testItShouldPreventRecursion = function () { assertEquals('{"a":"b","recursion":RECURSION}', angular.toJson(obj)); }; +JsonTest.prototype.testItShouldSerializeOnlyOwnProperties = function() { + var parent = { p: 'p'}; + var child = { c: 'c'}; + child.__proto__ = parent; + assertEquals('{"c":"c"}', angular.toJson(child)); +} + JsonTest.prototype.testItShouldSerializeSameObjectsMultipleTimes = function () { var obj = {a:'b'}; assertEquals('{"A":{"a":"b"},"B":{"a":"b"}}', angular.toJson({A:obj, B:obj})); |
