X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fajax.js;h=15c4ed744e44621dde53623e00919e251e6147d6;hb=0635df43914eec10e4b468ddb2f952f5024c644e;hp=8dcf7591e65b6385e8d767911d48db3715230c38;hpb=dcb46c7fe572923b02b575477ab02af797ab392a;p=jquery.git diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 8dcf759..15c4ed7 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -649,15 +649,15 @@ test("$.getJSON(String, Function) - JSON object", function() { }); }); -test("$.getJSON(String, Function) - Remote JSON object with assignment", function() { +test("$.getJSON(String, Function) - JSON object with absolute url to local content", function() { expect(2); var base = window.location.href.replace(/\?.*$/, ""); stop(); - $.getJSON(base + "data/json_assigned_obj.js", function() { - ok( typeof json_assigned_obj == "object", 'Check JSON loaded' ); - equals( json_assigned_obj.test, "worked", 'Check JSON obj.test' ); + $.getJSON(url(base + "data/json.php"), function(json) { + ok( json.data.lang == 'en', 'Check JSON: lang' ); + ok( json.data.length == 25, 'Check JSON: length' ); start(); }); });