diff --git a/test/middleware-mockserver.js b/test/middleware-mockserver.js index 863aaf6bd..165d33187 100644 --- a/test/middleware-mockserver.js +++ b/test/middleware-mockserver.js @@ -62,7 +62,7 @@ var mocks = { script: function( req, resp ) { if ( req.query.header === "ecma" ) { resp.writeHead( 200, { "content-type": "application/ecmascript" } ); - } else if ( req.query.header ) { + } else if ( "header" in req.query ) { resp.writeHead( 200, { "content-type": "text/javascript" } ); } else { resp.writeHead( 200, { "content-type": "text/html" } ); diff --git a/test/unit/ajax.js b/test/unit/ajax.js index b3b78cc5f..271496ce1 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -118,7 +118,7 @@ QUnit.module( "ajax", { return { create: function( options ) { options.crossDomain = true; - return jQuery.ajax( url( "mock.php?action=script" ), options ); + return jQuery.ajax( url( "mock.php?action=script&header" ), options ); }, success: function() { assert.ok( true, "success" );