From 9e67da420b60a417204ab53e8a16aa291f2b1ca0 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Wed, 16 Feb 2011 11:53:11 -0500 Subject: Corrected an issue where properties inherited from __proto__ show up in ng:repeat. Closses #112 --- test/widgetsSpec.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/widgetsSpec.js b/test/widgetsSpec.js index d4d0e43a..183fbe6a 100644 --- a/test/widgetsSpec.js +++ b/test/widgetsSpec.js @@ -727,6 +727,18 @@ describe("widget", function(){ expect(element.text()).toEqual('misko:swe;shyam:set;'); }); + it('should not ng:repeat over parent properties', function(){ + var Class = function(){}; + Class.prototype.abc = function(){}; + Class.prototype.value = 'abc'; + + var scope = compile(''); + scope.items = new Class(); + scope.items.name = 'value'; + scope.$eval(); + expect(element.text()).toEqual('name:value;'); + }); + it('should error on wrong parsing of ng:repeat', function(){ var scope = compile(''); -- cgit v1.2.3