Skip to content

Commit

Permalink
Fix tests to run with Angular 1.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Aug 13, 2013
1 parent 8038c2c commit 1835b58
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions todoMongoSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('App with Mongo', function() {
$controller('App', {$scope: $rootScope});

// flush pending requests
$rootScope.$digest();
$httpBackend.flush();

// store references to access them in specs
Expand All @@ -46,6 +47,8 @@ describe('App with Mongo', function() {

scope.newText = 'FAKE TASK';
scope.add();

scope.$digest();
});
});

Expand All @@ -63,6 +66,8 @@ describe('App with Mongo', function() {

scope.archive();
expect(scope.items.length).toBe(2);

scope.$digest();
});
});
});

0 comments on commit 1835b58

Please sign in to comment.