aboutsummaryrefslogtreecommitdiffstats
path: root/test/directive/ngRepeatSpec.js
diff options
context:
space:
mode:
authorIgor Minar2012-03-17 15:57:55 -0700
committerIgor Minar2012-03-17 15:57:55 -0700
commit935c1018da05dbf3124b2dd33619c4a3c82d7a2a (patch)
treee221f3c1597ff292ffa9483495701a0b92a251c8 /test/directive/ngRepeatSpec.js
parent78a6291666d55c8b1415e8090c7e6a35ae95df8b (diff)
downloadangular.js-935c1018da05dbf3124b2dd33619c4a3c82d7a2a.tar.bz2
fix(ngRepeat): correct variable reference in error message
Closese #803
Diffstat (limited to 'test/directive/ngRepeatSpec.js')
-rw-r--r--test/directive/ngRepeatSpec.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/directive/ngRepeatSpec.js b/test/directive/ngRepeatSpec.js
index 8b6a5173..85aa1511 100644
--- a/test/directive/ngRepeatSpec.js
+++ b/test/directive/ngRepeatSpec.js
@@ -64,12 +64,19 @@ describe('ng-repeat', function() {
}));
- it('should error on wrong parsing of ng-repeat', inject(function($rootScope, $compile, $log) {
+ it('should error on wrong parsing of ng-repeat', inject(function($rootScope, $compile) {
expect(function() {
element = $compile('<ul><li ng-repeat="i dont parse"></li></ul>')($rootScope);
}).toThrow("Expected ng-repeat in form of '_item_ in _collection_' but got 'i dont parse'.");
+ }));
+
- $log.error.logs.shift();
+ it("should throw error when left-hand-side of ng-repeat can't be parsed", inject(
+ function($rootScope, $compile) {
+ expect(function() {
+ element = $compile('<ul><li ng-repeat="i dont parse in foo"></li></ul>')($rootScope);
+ }).toThrow("'item' in 'item in collection' should be identifier or (key, value) but got " +
+ "'i dont parse'.");
}));