From: Mike Alsup Date: Tue, 2 Jan 2007 12:39:13 +0000 (+0000) Subject: added evalScripts test X-Git-Tag: 1.1a~46 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9c073265de00b196ddeb298fa01328210ccffd89;p=jquery.git added evalScripts test --- diff --git a/src/ajax/ajaxTest.js b/src/ajax/ajaxTest.js index 6ca9cd7c6..c8fae234b 100644 --- a/src/ajax/ajaxTest.js +++ b/src/ajax/ajaxTest.js @@ -362,3 +362,17 @@ test("ajaxSetup()", function() { }); $.ajax(); }); + +test("evalScripts() with no script elements", function() { + expect(2); + + var data = "this is just some bogus text"; + $('#foo').html(data); + ok ( true, 'before evalScripts()'); + try { + $('#foo').evalScripts(); + } catch(e) { + ok (false, 'exception evaluating scripts: ' + e.message); + } + ok ( true, 'after evalScripts()'); +});