Expected a spy, but got Function
You need to get into the actual method, which in this case is on the prototype. describe(‘When onGivePoints is fired’, function () { beforeEach(function () { spyOn(UsersBoardCollection.prototype, ‘restartPolling’).andCallThrough(); app.vent.trigger(‘onGivePoints’); }); it(‘the board collection should be fetched’, function () { expect(UsersBoardCollection.prototype.restartPolling).toHaveBeenCalled(); }); }); Spying on the prototype is a nice trick you can use when you … Read more