From 6495ff63ee50afe49b02412a3393c53c5a66e0aa Mon Sep 17 00:00:00 2001 From: Perry Govier Date: Thu, 25 Sep 2014 16:20:58 -0500 Subject: [PATCH] test(refresher): clean up last refresher patch's test --- test/unit/angular/controller/scrollController.unit.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test/unit/angular/controller/scrollController.unit.js b/test/unit/angular/controller/scrollController.unit.js index 06101a2ae3..de1472aff1 100644 --- a/test/unit/angular/controller/scrollController.unit.js +++ b/test/unit/angular/controller/scrollController.unit.js @@ -4,6 +4,7 @@ describe('$ionicScroll Controller', function() { beforeEach(function() { ionic.Platform.ready = function(cb) { cb(); }; + ionic.requestAnimationFrame = function(cb) { cb(); }; }); var scope, ctrl, timeout; @@ -242,7 +243,6 @@ describe('$ionicScroll Controller', function() { return { then: function(cb) { cb(); } }; }; }); - it('scrollToRememberedPosition should work', inject(function($$scrollValueCache) { spyOn(ctrl.scrollView, 'scrollTo'); $$scrollValueCache.foo = { left: 3, top: 4 }; @@ -380,20 +380,14 @@ describe('$ionicScroll Controller', function() { expect(scope.$onPulling).toHaveBeenCalled(); refreshingCb(); - expect(refresher.classList.contains('active')).toBe(true); expect(refresher.classList.contains('refreshing')).toBe(false); expect(scope.$onRefresh).not.toHaveBeenCalled(); doneCb(); - expect(refresher.classList.contains('active')).toBe(true); - expect(refresher.classList.contains('refreshing')).toBe(true); expect(scope.$onRefresh).toHaveBeenCalled(); - timeout.flush(); expect(refresher.classList.contains('active')).toBe(false); - expect(refresher.classList.contains('refreshing')).toBe(false); - expect(refresher.classList.contains('invisible')).toBe(true); showCb(); expect(refresher.classList.contains('invisible')).toBe(false);