diff options
| author | Misko Hevery | 2011-08-10 13:15:43 -0700 | 
|---|---|---|
| committer | Misko Hevery | 2011-08-12 15:47:47 -0700 | 
| commit | 42062dab34192d2cb9ed66a720c0f791408c61c0 (patch) | |
| tree | ca85b56f12dd0138dbe3d7f1346c4125d64e09a5 /test/BinderSpec.js | |
| parent | 1c9fc1e1dec67c8c05f02da1e0853439238c4d8e (diff) | |
| download | angular.js-42062dab34192d2cb9ed66a720c0f791408c61c0.tar.bz2 | |
refactor(scope): remove $flush/$observe ng:eval/ng:eval-order
Diffstat (limited to 'test/BinderSpec.js')
| -rw-r--r-- | test/BinderSpec.js | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/test/BinderSpec.js b/test/BinderSpec.js index a84fe68a..ecfe0682 100644 --- a/test/BinderSpec.js +++ b/test/BinderSpec.js @@ -54,8 +54,8 @@ describe('Binder', function(){    });    it('BindUpdate', function(){ -    var scope = this.compile('<div ng:eval="a=123"/>'); -    scope.$flush(); +    var scope = this.compile('<div ng:init="a=123"/>'); +    scope.$digest();      assertEquals(123, scope.a);    }); @@ -284,6 +284,7 @@ describe('Binder', function(){      assertEquals(['ErrorMsg1'], errorLogs.shift());      scope.error['throw'] = function(){throw "MyError";}; +    errorLogs.length = 0;      scope.$apply();      span = childNode(doc, 0);      assertTrue(span.hasClass('ng-exception')); @@ -309,8 +310,9 @@ describe('Binder', function(){          'throw': function(){throw new Error("ErrorMsg" + (++count));}      };      scope.$apply(); -    expect(errorLogs.length).toMatch(1); +    expect(errorLogs.length).not.toEqual(0);      expect(errorLogs.shift()).toMatch(/ErrorMsg1/); +    errorLogs.length = 0;      scope.error['throw'] =  function(){ return 'X';};      scope.$apply(); | 
