X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fattributes.js;h=2d0a0d6cded14ecae26bd6af0623bd042a91ac08;hb=a64dc0405064d68c7b7cd0f0fc8ea60086cbcd21;hp=c6007aacc8ab21df33757f1b2e970199baa3af18;hpb=b03416954d8033e641bd658fb18631699db6cc51;p=jquery.git diff --git a/test/unit/attributes.js b/test/unit/attributes.js index c6007aa..2d0a0d6 100644 --- a/test/unit/attributes.js +++ b/test/unit/attributes.js @@ -4,7 +4,7 @@ var bareObj = function(value) { return value; }; var functionReturningObj = function(value) { return (function() { return value; }); }; test("attr(String)", function() { - expect(30); + expect(31); // This one sometimes fails randomly ?! equals( jQuery('#text1').attr('value'), "Test", 'Check for value attribute' ); @@ -65,6 +65,8 @@ test("attr(String)", function() { ok( jQuery("
").attr("doesntexist") === undefined, "Make sure undefined is returned when no attribute is found." ); ok( jQuery().attr("doesntexist") === undefined, "Make sure undefined is returned when no element is there." ); + + equals( jQuery(document).attr("nodeName"), "#document", "attr works correctly on document nodes (bug #7451)." ); }); if ( !isLocal ) { @@ -512,7 +514,7 @@ test("addClass(Function)", function() { }); test("addClass(Function) with incoming value", function() { - expect(41); + expect(45); var div = jQuery("div"), old = div.map(function(){ return jQuery(this).attr("class"); @@ -585,7 +587,7 @@ test("removeClass(Function) - simple", function() { }); test("removeClass(Function) with incoming value", function() { - expect(41); + expect(45); var $divs = jQuery('div').addClass("test"), old = $divs.map(function(){ return jQuery(this).attr("class");