Skip to content

Commit

Permalink
fixed unit test that broke due to new angular mocks lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Bucholtz committed Apr 5, 2016
1 parent e82a3ea commit 821c176
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/unit/angular/controller/scrollController.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ describe('$ionicScroll Controller', function() {

it('should register with no handle', inject(function ($ionicScrollDelegate) {
nativeScrolling = nativeScrollingSetting;
spyOn($ionicScrollDelegate, '_registerInstance');
var deregisterSpy = jasmine.createSpy('deregister');
spyOn($ionicScrollDelegate, '_registerInstance').andCallFake(function(){
return deregisterSpy;
});
var el = setup();
expect($ionicScrollDelegate._registerInstance)
.toHaveBeenCalledWith(ctrl, undefined, jasmine.any(Function));
expect($ionicScrollDelegate._registerInstance).toHaveBeenCalledWith(ctrl, undefined, jasmine.any(Function));
}));

it('should register with given handle and deregister on destroy', inject(function ($ionicScrollDelegate) {
Expand Down

0 comments on commit 821c176

Please sign in to comment.