diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2018-03-07 20:09:09 -0500 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2018-05-14 14:09:43 -0400 |
commit | dc48b11e0c6c77e2b96e89a18f34d7b0c4f9a9d4 (patch) | |
tree | db4f37aee235c25bc970df56bb8359f2d1eddfde /test/unit/ajax.js | |
parent | 1f4375a34227f42570d2b72e190e51bcfb1e8597 (diff) | |
download | jquery-dc48b11e0c6c77e2b96e89a18f34d7b0c4f9a9d4.tar.gz jquery-dc48b11e0c6c77e2b96e89a18f34d7b0c4f9a9d4.zip |
squash! Set attributes all at once, src last
Diffstat (limited to 'test/unit/ajax.js')
-rw-r--r-- | test/unit/ajax.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 8a13810fc..72a4e7215 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -91,15 +91,13 @@ QUnit.module( "ajax", { ajaxTest( "jQuery.ajax() - custom attributes for script tag", 4, function( assert ) { - var nonceValue = "0123456789"; return { create: function( options ) { var xhr; options.dataType = "script"; - options.scriptAttrs = { id: "jquery-ajax-test", nonce: nonceValue }; - xhr = jQuery.ajax( url( "data/script.php?header=ecma" ), options ); - // Ensure the script tag has the nonce attr on it - assert.ok( nonceValue === jQuery( "#jquery-ajax-test" ).attr( "nonce" ), "nonce value" ); + options.scriptAttrs = { id: "jquery-ajax-test", async: "async" }; + xhr = jQuery.ajax( url( "mock.php?action=script" ), options ); + assert.equal( jQuery( "#jquery-ajax-test" ).attr( "async" ), "async", "attr value" ); return xhr; }, success: function() { |