Make sure that the contents of the element is still in place when html(Function)...
[jquery.git] / test / unit / manipulation.js
index 2fc6f18..7b4f4d1 100644 (file)
@@ -955,6 +955,17 @@ test("html(String)", function() {
 
 test("html(Function)", function() {
        testHtml(functionReturningObj);
+
+       expect(33);
+
+       QUnit.reset();
+
+       jQuery("#main").html(function(){
+               return jQuery(this).text();
+       });
+
+       ok( !/</.test( jQuery("#main").html() ), "Replace html with text." );
+       ok( jQuery("#main").html().length > 0, "Make sure text exists." );
 });
 
 test("html(Function) with incoming value", function() {