diff options
Diffstat (limited to 'test/ng/directive/ngRepeatSpec.js')
| -rw-r--r-- | test/ng/directive/ngRepeatSpec.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ng/directive/ngRepeatSpec.js b/test/ng/directive/ngRepeatSpec.js index 72035566..4cf79dbf 100644 --- a/test/ng/directive/ngRepeatSpec.js +++ b/test/ng/directive/ngRepeatSpec.js @@ -137,6 +137,14 @@ describe('ngRepeat', function() { }); + it("should throw an exception if 'track by' evaluates to 'hasOwnProperty'", function() { + scope.items = {age:20}; + $compile('<div ng-repeat="(key, value) in items track by \'hasOwnProperty\'"></div>')(scope); + scope.$digest(); + expect($exceptionHandler.errors.shift().message).toMatch(/ng:badname/); + }); + + it('should track using build in $id function', function() { element = $compile( '<ul>' + |
