mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Tests: Test AJAX deprecated event aliases properly
PR gh-5046 erroneously changed AJAX deprecated event alias
usage in deprecated tests to `.on()` calls. This change
reverses this mistake.
Closes gh-5195
Ref gh-5046
(cherry picked from commit cff2899885
)
This commit is contained in:
parent
cca7118658
commit
18139213ff
@ -97,7 +97,7 @@ QUnit.test( "trigger() shortcuts", function( assert ) {
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
if ( includesModule( "ajax" ) ) {
|
if ( includesModule( "ajax" ) ) {
|
||||||
ajaxTest( "jQuery.ajax() - events with context", 12, function( assert ) {
|
ajaxTest( "Ajax events aliases (with context)", 12, function( assert ) {
|
||||||
var context = document.createElement( "div" );
|
var context = document.createElement( "div" );
|
||||||
|
|
||||||
function event( e ) {
|
function event( e ) {
|
||||||
@ -113,10 +113,10 @@ if ( includesModule( "ajax" ) ) {
|
|||||||
return {
|
return {
|
||||||
setup: function() {
|
setup: function() {
|
||||||
jQuery( context ).appendTo( "#foo" )
|
jQuery( context ).appendTo( "#foo" )
|
||||||
.on( "ajaxSend", event )
|
.ajaxSend( event )
|
||||||
.on( "ajaxComplete", event )
|
.ajaxComplete( event )
|
||||||
.on( "ajaxError", event )
|
.ajaxError( event )
|
||||||
.on( "ajaxSuccess", event );
|
.ajaxSuccess( event );
|
||||||
},
|
},
|
||||||
requests: [ {
|
requests: [ {
|
||||||
url: url( "name.html" ),
|
url: url( "name.html" ),
|
||||||
|
Loading…
Reference in New Issue
Block a user