From 42062dab34192d2cb9ed66a720c0f791408c61c0 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Wed, 10 Aug 2011 13:15:43 -0700 Subject: refactor(scope): remove $flush/$observe ng:eval/ng:eval-order --- test/BinderSpec.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test/BinderSpec.js') 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('
'); - scope.$flush(); + var scope = this.compile('
'); + 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(); -- cgit v1.2.3