diff options
| author | Misko Hevery | 2010-12-07 11:39:59 -0800 |
|---|---|---|
| committer | Misko Hevery | 2010-12-08 14:20:26 -0800 |
| commit | fa722447f89e0215463cb39dfd1532189057fea8 (patch) | |
| tree | 6b82a971ddad19ac955650eccfcae908f29a5096 /test/ParserSpec.js | |
| parent | 81d10e819eac778d231b6ba06521c9562d0146cf (diff) | |
| download | angular.js-fa722447f89e0215463cb39dfd1532189057fea8.tar.bz2 | |
Fixed failed assignments of form abj[0].name=value
Closes #169
Diffstat (limited to 'test/ParserSpec.js')
| -rw-r--r-- | test/ParserSpec.js | 8 |
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); + }); }); |
