X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fajax.js;h=3e2ac9f2b7ae28c82904bb41a3c6c20c95ce8698;hb=4b8f6cdc86c395fb92c7d50e8642118963232af4;hp=162650f3bec16c66239c10b6bcfd2ada05676d62;hpb=7ac564cd98a869d558ea4b3be6919baab0f48d10;p=jquery.git diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 162650f..3e2ac9f 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -513,6 +513,19 @@ test("$.getJSON(String, Function) - JSON object", function() { }); }); +test("$.getJSON(String, Function) - Remote JSON object with assignment", 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' ); + start(); + }); +}); + test("$.post(String, Hash, Function) - simple with xml", function() { expect(4); stop();