test(): fix $timeout.flush

This commit is contained in:
Adam Bradley
2014-09-15 00:07:12 -05:00
parent 20d567f81c
commit 73a30e0659
2 changed files with 2 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ describe('Ionic ActionSheet Service', function() {
spyOn(scope, '$destroy');
spyOn(scope.element, 'remove');
scope.removeSheet();
$timeout.flush()
expect($document[0].body.classList.contains('action-sheet-open')).toBe(false);
expect(scope.element.hasClass('active')).toBe(false);
expect(scope.$destroy).toHaveBeenCalled();

View File

@@ -267,6 +267,7 @@ describe('$ionicPopup service', function() {
$timeout.flush();
expect($ionicBackdrop.release).toHaveBeenCalled();
expect(backDoneSpy).toHaveBeenCalled();
$timeout.flush();
expect(document.body.classList.contains('popup-open')).toBe(false);
}));
it('template should only overwrite prompt input if it includes html', inject(function($timeout) {