diff options
Diffstat (limited to 'test/ng')
| -rw-r--r-- | test/ng/directive/ngRepeatSpec.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ng/directive/ngRepeatSpec.js b/test/ng/directive/ngRepeatSpec.js index bdc0b8f5..2d70d4a4 100644 --- a/test/ng/directive/ngRepeatSpec.js +++ b/test/ng/directive/ngRepeatSpec.js @@ -177,6 +177,22 @@ describe('ngRepeat', function() { }); + it('should allow expressions over multiple lines', function() { + scope.isTrue = function() { + return true; + }; + element = $compile( + '<ul>' + + '<li ng-repeat="item in items\n' + + '| filter:isTrue">{{item.name}}</li>' + + '</ul>')(scope); + scope.items = [{name: 'igor'}]; + scope.$digest(); + + expect(element.find('li').text()).toBe('igor'); + }); + + it('should track using provided function when a filter is present', function() { scope.newArray = function (items) { var newArray = []; |
