]> source.dussan.org Git - jquery.git/commitdiff
Added a test case for $("<option>test</option>")[0].selected (bug #2050).
authorJohn Resig <jeresig@gmail.com>
Fri, 14 Dec 2007 01:57:29 +0000 (01:57 +0000)
committerJohn Resig <jeresig@gmail.com>
Fri, 14 Dec 2007 01:57:29 +0000 (01:57 +0000)
test/unit/core.js

index 12b405644ac4dc2c6b5ce8b4d6575d214e13d664..03f89d1cc098cd2d0b474e2052da4f06656933d4 100644 (file)
@@ -152,7 +152,7 @@ test("isFunction", function() {
 var foo = false;
 
 test("$('html')", function() {
-       expect(5);
+       expect(6);
 
        reset();
        foo = false;
@@ -169,6 +169,8 @@ test("$('html')", function() {
 
        var j = $("<span>hi</span> there <!-- mon ami -->");
        ok( j.length >= 2, "Check node,textnode,comment creation (some browsers delete comments)" );
+
+       ok( !$("<option>test</option>")[0].selected, "Make sure that options are auto-selected #2050" );
 });
 
 test("$('html', context)", function() {