aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/button/button_core.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/unit/button/button_core.js b/tests/unit/button/button_core.js
index 41623e08d..f647cdc26 100644
--- a/tests/unit/button/button_core.js
+++ b/tests/unit/button/button_core.js
@@ -53,6 +53,20 @@ test("radio groups", function() {
assert(":eq(1)", ":eq(0)", ":eq(0)");
});
+test( "radio groups - ignore elements with same name", function() {
+ expect( 1 );
+ var form = $( "form:first" ),
+ radios = form.find( "[type=radio]" ).button(),
+ checkbox = $( "<input>", {
+ type: "checkbox",
+ name: radios.attr( "name" )
+ });
+
+ form.append( checkbox );
+ radios.button( "refresh" );
+ ok( true, "no exception from accessing button instance of checkbox" );
+});
+
test("input type submit, don't create child elements", function() {
expect( 2 );
var input = $("#submit");