Fix failing tests after jQuery upgrade

This commit is contained in:
Prem Sichanugrist
2012-07-02 14:00:49 -04:00
parent e7e0fe1f3d
commit de4d487402
2 changed files with 3 additions and 3 deletions

View File

@@ -12,8 +12,8 @@ describe 'Calculator', ->
it 'bind the help button', ->
# These events are bind by $.hover()
expect($('div.help-wrapper a')).toHandleWith 'mouseenter', @calculator.helpToggle
expect($('div.help-wrapper a')).toHandleWith 'mouseleave', @calculator.helpToggle
expect($('div.help-wrapper a')).toHandleWith 'mouseover', @calculator.helpToggle
expect($('div.help-wrapper a')).toHandleWith 'mouseout', @calculator.helpToggle
it 'prevent default behavior on help button', ->
$('div.help-wrapper a').click (e) ->

View File

@@ -25,7 +25,7 @@ describe 'Logger', ->
it 'send a request to log event', ->
spyOn($, 'ajax')
$(window).trigger('onunload')
window.onunload()
expect($.ajax).toHaveBeenCalledWith
url: "#{Courseware.prefix}/event",
data: