add unit test for speed_change_video event

This commit is contained in:
Szczork
2014-02-04 11:52:43 +01:00
parent 6277d747e1
commit 08ce047fe2

View File

@@ -196,6 +196,17 @@
});
});
it('speed_change_video event is not logged when speed not change', function () {
expect(state.videoPlayer.log).not.toHaveBeenCalledWith(
'speed_change_video',
{
current_time: state.videoPlayer.currentTime,
old_speed: state.speed,
new_speed: state.speed
}
);
});
it('log the play_video event', function () {
expect(state.videoPlayer.log).toHaveBeenCalledWith(
'play_video', { currentTime: 0 }