From 2cc9679ea8f47114c1809e4a9a221eb1698e0c92 Mon Sep 17 00:00:00 2001 From: jmclaus Date: Tue, 24 Sep 2013 09:12:33 +0200 Subject: [PATCH] Used Jasmine jQuery for tests instead --- .../xmodule/js/spec/video/video_speed_control_spec.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/spec/video/video_speed_control_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_speed_control_spec.js index 4b650d11be..a4369005cc 100644 --- a/common/lib/xmodule/xmodule/js/spec/video/video_speed_control_spec.js +++ b/common/lib/xmodule/xmodule/js/spec/video/video_speed_control_spec.js @@ -140,24 +140,22 @@ }); describe('make sure the speed control gets the focus afterwards', function() { - var focusSpy; + var spyEvent; beforeEach(function() { initialize(); videoSpeedControl.setSpeed(1.0); - focusSpy = spyOn($.fn, 'focus').andCallThrough(); + spyEvent = spyOnEvent('.speeds > a', 'focus'); }); it('when the speed is the same', function() { $('li[data-speed="1.0"] a').click(); - expect(focusSpy).toHaveBeenCalled(); - expect(focusSpy.mostRecentCall.object.selector).toEqual('.parent().parent().siblings(a)'); + expect(spyEvent).toHaveBeenTriggered(); }); it('when the speed is not the same', function() { $('li[data-speed="0.75"] a').click(); - expect(focusSpy).toHaveBeenCalled(); - expect(focusSpy.mostRecentCall.object.selector).toEqual('.parent().parent().siblings(a)'); + expect(spyEvent).toHaveBeenTriggered();; }); }); });