From b21904007fe46710497ec252e3feee9df3e5c6cb Mon Sep 17 00:00:00 2001 From: Dave Stein Date: Tue, 15 Jan 2013 19:42:03 -0500 Subject: [PATCH] Draggable: Added test for disabled --- tests/unit/draggable/draggable_options.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/unit/draggable/draggable_options.js b/tests/unit/draggable/draggable_options.js index 6f7e06ce7..57b3da6b2 100644 --- a/tests/unit/draggable/draggable_options.js +++ b/tests/unit/draggable/draggable_options.js @@ -514,6 +514,23 @@ test( "cursorAt, switching after initialization", function() { }); + +test( "disabled", function() { + + expect( 3 ); + + var el = $("#draggable1").draggable(); + + TestHelpers.draggable.shouldMove(el); + + el.draggable( "option", "disabled", true ); + TestHelpers.draggable.shouldNotMove(el); + + el.draggable( "option", "disabled", false ); + TestHelpers.draggable.shouldMove(el); + +}); + test("{ grid: [50, 50] }, relative", function() { expect( 2 );