From: Anton M Date: Wed, 24 Nov 2010 22:35:26 +0000 (+0100) Subject: Add unit test for fix to #7578. X-Git-Tag: 1.5b1~119^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F105%2Fhead;p=jquery.git Add unit test for fix to #7578. --- diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 4ce14c24c..9e6f32de2 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -710,10 +710,10 @@ test("jQuery.getScript(String, Function) - no callback", function() { }); test("jQuery.ajax() - JSONP, Local", function() { - expect(8); + expect(9); var count = 0; - function plus(){ if ( ++count == 8 ) start(); } + function plus(){ if ( ++count == 9 ) start(); } stop(); @@ -828,6 +828,17 @@ test("jQuery.ajax() - JSONP, Local", function() { plus(); } }); + + //#7578 + jQuery.ajax({ + url: "data/jsonp.php", + dataType: "jsonp", + beforeSend: function(){ + strictEqual( this.cache, false, "cache must be false on JSON request" ); + plus(); + return false; + } + }); }); test("JSONP - Custom JSONP Callback", function() {