aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/button/button_options.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-02-29 22:09:26 -0500
committerScott González <scott.gonzalez@gmail.com>2012-02-29 22:09:26 -0500
commitb4d9eee966f1dec06f0772e38bba9e5c864374f9 (patch)
tree6560f7f0b2cb9e688e46727f8ad27aac6eeccb79 /tests/unit/button/button_options.js
parent8c10c1e41b07ebadf8b3cf67fac88d27ee6c9fdb (diff)
parent63215a68757c4fa78079a48488d9a91f0ec8cf50 (diff)
downloadjquery-ui-b4d9eee966f1dec06f0772e38bba9e5c864374f9.tar.gz
jquery-ui-b4d9eee966f1dec06f0772e38bba9e5c864374f9.zip
Merge branch 'master' into selectmenu
Diffstat (limited to 'tests/unit/button/button_options.js')
-rw-r--r--tests/unit/button/button_options.js38
1 files changed, 19 insertions, 19 deletions
diff --git a/tests/unit/button/button_options.js b/tests/unit/button/button_options.js
index a3ab5ae10..9ef4a19db 100644
--- a/tests/unit/button/button_options.js
+++ b/tests/unit/button/button_options.js
@@ -7,26 +7,26 @@ module("button: options");
test("disabled, explicit value", function() {
$("#radio01").button({ disabled: false });
- same(false, $("#radio01").button("option", "disabled"),
+ deepEqual(false, $("#radio01").button("option", "disabled"),
"disabled option set to false");
- same(false, $("#radio01").prop("disabled"), "element is disabled");
-
+ deepEqual(false, $("#radio01").prop("disabled"), "element is disabled");
+
$("#radio02").button({ disabled: true });
- same(true, $("#radio02").button("option", "disabled"),
+ deepEqual(true, $("#radio02").button("option", "disabled"),
"disabled option set to true");
- same(true, $("#radio02").prop("disabled"), "element is not disabled");
+ deepEqual(true, $("#radio02").prop("disabled"), "element is not disabled");
});
test("disabled, null", function() {
$("#radio01").button({ disabled: null });
- same(false, $("#radio01").button("option", "disabled"),
+ deepEqual(false, $("#radio01").button("option", "disabled"),
"disabled option set to false");
- same(false, $("#radio01").prop("disabled"), "element is disabled");
-
+ deepEqual(false, $("#radio01").prop("disabled"), "element is disabled");
+
$("#radio02").prop("disabled", true).button({ disabled: null });
- same(true, $("#radio02").button("option", "disabled"),
+ deepEqual(true, $("#radio02").button("option", "disabled"),
"disabled option set to true");
- same(true, $("#radio02").prop("disabled"), "element is not disabled");
+ deepEqual(true, $("#radio02").prop("disabled"), "element is not disabled");
});
test("text false without icon", function() {
@@ -34,7 +34,7 @@ test("text false without icon", function() {
text: false
});
ok( $("#button").is(".ui-button-text-only:not(.ui-button-icon-only)") );
-
+
$("#button").button("destroy");
});
@@ -46,14 +46,14 @@ test("text false with icon", function() {
}
});
ok( $("#button").is(".ui-button-icon-only:not(.ui-button-text):has(span.ui-icon.iconclass)") );
-
+
$("#button").button("destroy");
});
test("label, default", function() {
$("#button").button();
- same( $("#button").text(), "Label" );
-
+ deepEqual( $("#button").text(), "Label" );
+
$("#button").button("destroy");
});
@@ -61,20 +61,20 @@ test("label", function() {
$("#button").button({
label: "xxx"
});
- same( $("#button").text(), "xxx" );
-
+ deepEqual( $("#button").text(), "xxx" );
+
$("#button").button("destroy");
});
test("label default with input type submit", function() {
- same( $("#submit").button().val(), "Label" );
+ deepEqual( $("#submit").button().val(), "Label" );
});
test("label with input type submit", function() {
var label = $("#submit").button({
label: "xxx"
}).val();
- same( label, "xxx" );
+ deepEqual( label, "xxx" );
});
test("icons", function() {
@@ -86,7 +86,7 @@ test("icons", function() {
}
});
ok( $("#button").is(":has(span.ui-icon.ui-button-icon-primary.iconclass):has(span.ui-icon.ui-button-icon-secondary.iconclass2)") );
-
+
$("#button").button("destroy");
});