diff options
| author | Misko Hevery | 2011-08-17 12:21:43 -0700 | 
|---|---|---|
| committer | Igor Minar | 2011-10-11 10:53:03 -0700 | 
| commit | e134a8335f5ee7d2e81034ed93f3e465cb14573f (patch) | |
| tree | a01dc685708c5db9e1e564853bb292d6f7ad7a7a /test/JsonSpec.js | |
| parent | 8ee32a75f07da96ec1cc4a8474a9a53e5c2aca98 (diff) | |
| download | angular.js-e134a8335f5ee7d2e81034ed93f3e465cb14573f.tar.bz2 | |
fix(filter): make json filter ignore private properties
Diffstat (limited to 'test/JsonSpec.js')
| -rw-r--r-- | test/JsonSpec.js | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/test/JsonSpec.js b/test/JsonSpec.js index d9b245f9..b0bb15bc 100644 --- a/test/JsonSpec.js +++ b/test/JsonSpec.js @@ -11,6 +11,10 @@ describe('json', function(){      expect(toJson("a \t \n \r b \\")).toEqual('"a \\t \\n \\r b \\\\"');    }); +  it('should not serialize $$properties', function(){ +    expect(toJson({$$some:'value', 'this':1, '$parent':1}, false)).toEqual('{}'); +  }); +    it('should serialize strings with escaped characters', function() {      expect(toJson("7\\\"7")).toEqual("\"7\\\\\\\"7\"");    }); | 
