diff options
| author | Misko Hevery | 2010-05-10 10:36:06 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-05-10 10:36:06 -0700 |
| commit | f5027cc375cf29d8a78679297d9f6bdca9567eb7 (patch) | |
| tree | f415af2b615656562c1d1ac10fe9b4aab83b54c7 /test/JsonTest.js | |
| parent | 4542716370ac52f385795f509436104a2a3501d2 (diff) | |
| parent | 664f1c56876f00b885272c39f759641271eef1dc (diff) | |
| download | angular.js-f5027cc375cf29d8a78679297d9f6bdca9567eb7.tar.bz2 | |
Merge branch 'master' of github.com:angular/angular.js
Diffstat (limited to 'test/JsonTest.js')
| -rw-r--r-- | test/JsonTest.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/JsonTest.js b/test/JsonTest.js index 9b275248..1ed56da8 100644 --- a/test/JsonTest.js +++ b/test/JsonTest.js @@ -63,9 +63,9 @@ JsonTest.prototype.testItShouldEscapeUnicode = function () { JsonTest.prototype.testItShouldUTCDates = function() { var date = angular.String.toDate("2009-10-09T01:02:03Z"); - assertEquals('"2009-10-09T01:02:03Z"', toJson(date)); - assertEquals(date.getTime(), - fromJson('"2009-10-09T01:02:03Z"').getTime()); + assertEquals('"2009-10-09T01:02:03Z"', toJson(date)); + assertEquals(date.getTime(), + fromJson('"2009-10-09T01:02:03Z"').getTime()); }; JsonTest.prototype.testItShouldPreventRecursion = function () { @@ -78,3 +78,7 @@ JsonTest.prototype.testItShouldSerializeSameObjectsMultipleTimes = function () { var obj = {a:'b'}; assertEquals('{"A":{"a":"b"},"B":{"a":"b"}}', angular.toJson({A:obj, B:obj})); }; + +JsonTest.prototype.testItShouldNotSerializeUndefinedValues = function () { + assertEquals('{}', angular.toJson({A:undefined})); +}; |
