X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Funit%2Fattributes.js;h=06920762b7244539c45e376ea15ee5a905b20f44;hb=66975de2d249643779e2b3daad0457f7f5f92508;hp=a837428d2a3b37c661d0cb2c046fbc7213817223;hpb=5e811146ee34fde5fa60e142e7ee4422e2748024;p=jquery.git diff --git a/test/unit/attributes.js b/test/unit/attributes.js index a837428..0692076 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(27); + expect(28); // This one sometimes fails randomly ?! equals( jQuery('#text1').attr('value'), "Test", 'Check for value attribute' ); @@ -55,6 +55,12 @@ test("attr(String)", function() { ok( $body.attr('foo') === undefined, 'Make sure the expando is preferred over the dom attribute, even if undefined' ); body.removeAttribute('foo'); // Cleanup + + var select = document.createElement("select"), optgroup = document.createElement("optgroup"), option = document.createElement("option"); + optgroup.appendChild( option ); + select.appendChild( optgroup ); + + equals( jQuery(option).attr("selected"), true, "Make sure that a single option is selected, even when in an optgroup." ); }); if ( !isLocal ) {