diff options
author | Felix Nagel <info@felixnagel.com> | 2013-03-19 19:59:31 +0100 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2013-03-19 19:59:31 +0100 |
commit | 1ce8d87f8bee3b1ec8698e0e2b8ead726d0d4ca2 (patch) | |
tree | 77edf8d66ab74aa11b86c286ba2a528b4d3c36de /tests/unit/droppable | |
parent | 5a9a80f86cc7844e7357af834c61cc14431110d1 (diff) | |
parent | 1c1f7c6184ba6f6a13e93960ea77c293f9d4308e (diff) | |
download | jquery-ui-1ce8d87f8bee3b1ec8698e0e2b8ead726d0d4ca2.tar.gz jquery-ui-1ce8d87f8bee3b1ec8698e0e2b8ead726d0d4ca2.zip |
Merge branch 'master' into selectmenu
Diffstat (limited to 'tests/unit/droppable')
-rw-r--r-- | tests/unit/droppable/droppable_methods.js | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/tests/unit/droppable/droppable_methods.js b/tests/unit/droppable/droppable_methods.js index 2b452a63d..f7682d262 100644 --- a/tests/unit/droppable/droppable_methods.js +++ b/tests/unit/droppable/droppable_methods.js @@ -63,26 +63,29 @@ test("enable", function() { equal(actual, expected, "enable is chainable"); }); -test("disable", function() { - expect(7); +test( "disable", function() { + expect( 10 ); - var el, actual, expected; + var actual, expected, + element = $( "#droppable1" ).droppable({ disabled: false }); - el = $("#droppable1").droppable({ disabled: false }); TestHelpers.droppable.shouldDrop(); - el.droppable("disable"); + element.droppable( "disable" ); TestHelpers.droppable.shouldNotDrop(); - equal(el.droppable("option", "disabled"), true, "disabled option getter"); - el.droppable("destroy"); - el.droppable({ disabled: false }); + equal( element.droppable( "option", "disabled" ), true, "disabled option getter" ); + element.droppable( "destroy" ); + element.droppable({ disabled: false }); TestHelpers.droppable.shouldDrop(); - el.droppable("option", "disabled", true); - equal(el.droppable("option", "disabled"), true, "disabled option setter"); + element.droppable( "option", "disabled", true ); + ok( !element.droppable( "widget" ).hasClass( "ui-state-disabled" ), "element does not get ui-state-disabled" ); + ok( !element.droppable( "widget" ).attr( "aria-disabled" ), "element does not get aria-disabled" ); + ok( element.droppable( "widget" ).hasClass( "ui-droppable-disabled" ), "element gets ui-droppable-disabled" ); + equal( element.droppable( "option", "disabled" ), true, "disabled option setter" ); TestHelpers.droppable.shouldNotDrop(); - expected = $("<div></div>").droppable(), - actual = expected.droppable("disable"); - equal(actual, expected, "disable is chainable"); + expected = $( "<div></div>" ).droppable(); + actual = expected.droppable( "disable" ); + equal( actual, expected, "disable is chainable" ); }); })(jQuery); |