From 26e651996a9cd7fa1acf6380fad8b335b769554d Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Wed, 30 Mar 2011 16:28:28 -0700 Subject: fix JSON to match native browser behavior --- test/JsonSpec.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/JsonSpec.js') diff --git a/test/JsonSpec.js b/test/JsonSpec.js index 2067d88f..3b81a44f 100644 --- a/test/JsonSpec.js +++ b/test/JsonSpec.js @@ -78,10 +78,11 @@ describe('json', function(){ expect(angular.toJson(obj)).toEqual('{"$a":"a"}'); }); - it('should serialize inherited properties', function() { + it('should NOT serialize inherited properties', function() { + // This is what native Browser does var obj = inherit({p:'p'}); obj.a = 'a'; - expect(angular.toJson(obj)).toEqual('{"a":"a","p":"p"}'); + expect(angular.toJson(obj)).toEqual('{"a":"a"}'); }); it('should serialize same objects multiple times', function() { -- cgit v1.2.3