Commit 78996a9c by polesye

Fix unit test.

parent ada5cb4a
...@@ -220,15 +220,13 @@ ...@@ -220,15 +220,13 @@
beforeEach(function () { beforeEach(function () {
state = jasmine.initializePlayer(); state = jasmine.initializePlayer();
state.videoSpeedControl.setSpeed(1.0); state.videoSpeedControl.setSpeed(1.0);
spyOn($.fn, 'trigger').andCallThrough();
$('li[data-speed="0.75"] a').click();
}); });
it('trigger speedChange event', function () { it('trigger speedChange event', function () {
expect($.fn.trigger.mostRecentCall.args[0]).toEqual( spyOnEvent(state.el, 'speedchange');
'speedchange', ['0.75']
); $('li[data-speed="0.75"] a').click();
expect('speedchange').toHaveBeenTriggeredOn(state.el);
expect(state.videoSpeedControl.currentSpeed).toEqual('0.75'); expect(state.videoSpeedControl.currentSpeed).toEqual('0.75');
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment