aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/ajax.js
diff options
context:
space:
mode:
authorOleg Gaidarenko <markelog@gmail.com>2015-02-10 22:42:21 +0300
committerOleg Gaidarenko <markelog@gmail.com>2015-02-15 02:01:59 +0300
commit4ef120d3f2578fe3d52eb6c0d0641df945991391 (patch)
tree9b836dd55f80398f5203bc2497d30a1e8d0cb51d /test/unit/ajax.js
parent0ac28ed293681cb8f2e9fdd11efa0021da039c84 (diff)
downloadjquery-4ef120d3f2578fe3d52eb6c0d0641df945991391.tar.gz
jquery-4ef120d3f2578fe3d52eb6c0d0641df945991391.zip
Ajax: make jQuery#load "type" field explicit
* Move "evalScript.php" file to appropriate place * Make jQuery#load "type" field explicit and add test for it Ref trac-11264
Diffstat (limited to 'test/unit/ajax.js')
-rw-r--r--test/unit/ajax.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js
index 29a4dfb46..20469d4e7 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -1689,11 +1689,22 @@ module( "ajax", {
ok( false, "Global event triggered" );
});
- jQuery("#qunit-fixture").append("<script src='data/evalScript.php'></script>");
+ jQuery("#qunit-fixture").append("<script src='data/ajax/evalScript.php'></script>");
jQuery( document ).off("ajaxStart ajaxStop");
});
+ asyncTest( "jQuery#load() - always use GET method even if it overrided through ajaxSetup (#11264)", 1, function() {
+ jQuery.ajaxSetup({
+ type: "POST"
+ });
+
+ jQuery( "#qunit-fixture" ).load( "data/ajax/method.php", function( method ) {
+ equal( method, "GET" );
+ start();
+ });
+ });
+
asyncTest( "#11402 - jQuery.domManip() - script in comments are properly evaluated", 2, function() {
jQuery("#qunit-fixture").load( "data/cleanScript.html", start );
});