r3613 committed - button: more unit tests for radio/checkbox

r3613 committed - button: more unit tests for radio/checkbox

Revision: 3613
Author: joern.zaefferer
Date: Tue Jan 5 07:07:27 2010
Log: button: more unit tests for radio/checkbox
http://code.google.com/p/jquery-ui/source/detail?r=3613
Modified:
/branches/dev/tests/unit/button/button_core.js
=======================================
--- /branches/dev/tests/unit/button/button_core.js    Sun Jan 3 17:44:34 2010
/branches/dev/tests/unit/button/button_core.js    Tue Jan 5 07:07:27 2010
@@ -7,6
7,26 @@
module
"button: core"
;
test
"checkbox", function
{
    var input = $
"#check"
;
        label = $
"label[for=check]"
;
    ok
input.is
":visble"

;
    ok
label.is
":not
.ui-button
"

;
    input.button
;
    ok
input.is
":hidden"

;
    ok
label.is
".ui-button"

;
}
;
test
"radios", function
{
    var inputs = $
"#radio0 input"
;
        labels = $
"#radio0 label"
;
    ok
inputs.is
":visble"

;
    ok
labels.is
":not
.ui-button
"

;
    inputs.button
;
    ok
inputs.is
":hidden"

;
    ok
labels.is
".ui-button"

;
}
;
function assert
noForm, form1, form2
{
    ok
$
"#radio0 .ui-button"
noForm
.is
".ui-state-active"

;
    ok
$
"#radio1 .ui-button"
form1
.is
".ui-state-active"

;
--