aboutsummaryrefslogtreecommitdiffstats
path: root/test/ParserSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ParserSpec.js')
-rw-r--r--test/ParserSpec.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ParserSpec.js b/test/ParserSpec.js
index 06cec2b3..c26125da 100644
--- a/test/ParserSpec.js
+++ b/test/ParserSpec.js
@@ -413,4 +413,12 @@ describe('parser', function() {
expect(scope.$eval("a=undefined")).not.toBeDefined();
expect(scope.$get("a")).not.toBeDefined();
});
+
+ it('should allow assignment after array dereference', function(){
+ scope = angular.scope();
+ scope.obj = [{}];
+ scope.$eval('obj[0].name=1');
+ expect(scope.obj.name).toBeUndefined();
+ expect(scope.obj[0].name).toEqual(1);
+ });
});