diff --git a/test/middleware-mockserver.js b/test/middleware-mockserver.js index bb31eabfa..36216ecc1 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 3f301f18f..bcb234640 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -114,7 +114,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" );