diff options
author | Felix Nagel <info@felixnagel.com> | 2012-12-12 16:44:19 +0100 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-12-12 16:44:19 +0100 |
commit | f6372bd7eac41ae2c022ef510ec414d016e820ed (patch) | |
tree | b764593154e334e03701dbc896dbac0154c5d136 /tests/unit/draggable/draggable_events.js | |
parent | d1350f9f1113ef5590ec010f16da7068646aec01 (diff) | |
parent | 747d8534520fc3abad81b3c171fa931149398d99 (diff) | |
download | jquery-ui-f6372bd7eac41ae2c022ef510ec414d016e820ed.tar.gz jquery-ui-f6372bd7eac41ae2c022ef510ec414d016e820ed.zip |
Merge branch 'master' into selectmenu
Diffstat (limited to 'tests/unit/draggable/draggable_events.js')
-rw-r--r-- | tests/unit/draggable/draggable_events.js | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/unit/draggable/draggable_events.js b/tests/unit/draggable/draggable_events.js index 5eab97713..07a53e22e 100644 --- a/tests/unit/draggable/draggable_events.js +++ b/tests/unit/draggable/draggable_events.js @@ -18,7 +18,10 @@ test("callbacks occurrence count", function() { stop: function() { stop++; } }); - TestHelpers.draggable.drag(el, 10, 10); + el.simulate( "drag", { + dx: 10, + dy: 10 + }); equal(start, 1, "start callback should happen exactly once"); equal(dragc, 3, "drag callback should happen exactly once per mousemove"); @@ -39,7 +42,10 @@ test("stopping the start callback", function() { stop: function() { stop++; } }); - TestHelpers.draggable.drag(el, 10, 10); + el.simulate( "drag", { + dx: 10, + dy: 10 + }); equal(start, 1, "start callback should happen exactly once"); equal(dragc, 0, "drag callback should not happen at all"); @@ -60,7 +66,10 @@ test("stopping the drag callback", function() { stop: function() { stop++; } }); - TestHelpers.draggable.drag(el, 10, 10); + el.simulate( "drag", { + dx: 10, + dy: 10 + }); equal(start, 1, "start callback should happen exactly once"); equal(dragc, 1, "drag callback should happen exactly once"); @@ -77,7 +86,10 @@ test("stopping the stop callback", function() { stop: function() { return false; } }); - TestHelpers.draggable.drag(el, 10, 10); + el.simulate( "drag", { + dx: 10, + dy: 10 + }); ok($("#draggable2").data('ui-draggable').helper, "the clone should not be deleted if the stop callback is stopped"); |