added evalScripts test
authorMike Alsup <malsup@gmail.com>
Tue, 2 Jan 2007 12:39:13 +0000 (12:39 +0000)
committerMike Alsup <malsup@gmail.com>
Tue, 2 Jan 2007 12:39:13 +0000 (12:39 +0000)
src/ajax/ajaxTest.js

index 6ca9cd7..c8fae23 100644 (file)
@@ -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()');
+});