diff options
| author | Misko Hevery | 2010-11-10 16:08:54 -0800 |
|---|---|---|
| committer | Misko Hevery | 2010-11-10 21:01:17 -0800 |
| commit | 0499c4727036446f5c8a5722bbd9c4018dae146f (patch) | |
| tree | 334261fe7a47d325eb5d0fce653049a4d8940555 /test/BinderTest.js | |
| parent | 43a4ff4cdf4100ded15b90d49a514648a88b87b4 (diff) | |
| download | angular.js-0499c4727036446f5c8a5722bbd9c4018dae146f.tar.bz2 | |
added ng:switch-when-default; changed $watch to always fire on init. (may be backward incompatible)
Diffstat (limited to 'test/BinderTest.js')
| -rw-r--r-- | test/BinderTest.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/BinderTest.js b/test/BinderTest.js index 06f0a449..71b2f6b6 100644 --- a/test/BinderTest.js +++ b/test/BinderTest.js @@ -607,13 +607,13 @@ BinderTest.prototype.testItShouldListenOnRightScope = function() { '<ul ng:init="counter=0; gCounter=0" ng:watch="w:counter=counter+1">' + '<li ng:repeat="n in [1,2,4]" ng:watch="w:counter=counter+1;w:$root.gCounter=$root.gCounter+n"/></ul>'); c.scope.$eval(); - assertEquals(0, c.scope.$get("counter")); - assertEquals(0, c.scope.$get("gCounter")); + assertEquals(1, c.scope.$get("counter")); + assertEquals(7, c.scope.$get("gCounter")); c.scope.$set("w", "something"); c.scope.$eval(); - assertEquals(1, c.scope.$get("counter")); - assertEquals(7, c.scope.$get("gCounter")); + assertEquals(2, c.scope.$get("counter")); + assertEquals(14, c.scope.$get("gCounter")); }; BinderTest.prototype.testItShouldRepeatOnHashes = function() { |
