diff options
Diffstat (limited to 'tests/unit/droppable')
-rw-r--r-- | tests/unit/droppable/droppable_methods.js | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/tests/unit/droppable/droppable_methods.js b/tests/unit/droppable/droppable_methods.js index f7682d262..2b452a63d 100644 --- a/tests/unit/droppable/droppable_methods.js +++ b/tests/unit/droppable/droppable_methods.js @@ -63,29 +63,26 @@ test("enable", function() { equal(actual, expected, "enable is chainable"); }); -test( "disable", function() { - expect( 10 ); +test("disable", function() { + expect(7); - var actual, expected, - element = $( "#droppable1" ).droppable({ disabled: false }); + var el, actual, expected; + el = $("#droppable1").droppable({ disabled: false }); TestHelpers.droppable.shouldDrop(); - element.droppable( "disable" ); + el.droppable("disable"); TestHelpers.droppable.shouldNotDrop(); - equal( element.droppable( "option", "disabled" ), true, "disabled option getter" ); - element.droppable( "destroy" ); - element.droppable({ disabled: false }); + equal(el.droppable("option", "disabled"), true, "disabled option getter"); + el.droppable("destroy"); + el.droppable({ disabled: false }); TestHelpers.droppable.shouldDrop(); - 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" ); + el.droppable("option", "disabled", true); + equal(el.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); |