diff options
| author | Misko Hevery | 2010-05-07 12:09:14 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-05-07 12:09:14 -0700 |
| commit | 038a743e6f49c347a38edc0e54dcbb175905a475 (patch) | |
| tree | 8eb10232c94967159175bde5a9209aaf5ba07c67 /test/JsonTest.js | |
| parent | ac1d02d0658cb74ae3822e364f84809d78cda335 (diff) | |
| download | angular.js-038a743e6f49c347a38edc0e54dcbb175905a475.tar.bz2 | |
xhr bulk fixes
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})); +}; |
