From c42164097caca488ac1b1761a6678793f2c3322f Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Mon, 2 Feb 2009 06:34:44 +0000 Subject: [PATCH] draggable unit tests: cleanup --- tests/unit/draggable/defaults.js | 61 ------------------- tests/unit/draggable/draggable.html | 3 +- .../{draggable.js => draggable_core.js} | 0 tests/unit/draggable/draggable_defaults.js | 42 +++++++++---- tests/unit/draggable/draggable_tickets.js | 4 -- 5 files changed, 31 insertions(+), 79 deletions(-) delete mode 100644 tests/unit/draggable/defaults.js rename tests/unit/draggable/{draggable.js => draggable_core.js} (100%) diff --git a/tests/unit/draggable/defaults.js b/tests/unit/draggable/defaults.js deleted file mode 100644 index 46f208f5e..000000000 --- a/tests/unit/draggable/defaults.js +++ /dev/null @@ -1,61 +0,0 @@ -/* - * draggable_defaults.js - */ - -var draggable_defaults = { - - appendTo: "parent", - - axis: false, - - cancel: ":input,option", - - connectToSortable: false, - - containment: false, - - cursor: "auto", - - cursorAt: false, - - delay: 0, - - disabled: false, - - distance: 1, - - grid: false, - - handle: false, - - helper: "original", - - iframeFix: false, - - opacity: false, - - refreshPositions: false, - - revert: false, - - revertDuration: 500, - - scroll: true, - - scrollSensitivity: 20, - - scrollSpeed: 20, - - scope: "default", - - snap: false, - - snapMode: "both", - - snapTolerance: 20, - - stack: false, - - zIndex: false - -}; diff --git a/tests/unit/draggable/draggable.html b/tests/unit/draggable/draggable.html index 57918f2d4..2fd541b39 100644 --- a/tests/unit/draggable/draggable.html +++ b/tests/unit/draggable/draggable.html @@ -12,8 +12,7 @@ - - + diff --git a/tests/unit/draggable/draggable.js b/tests/unit/draggable/draggable_core.js similarity index 100% rename from tests/unit/draggable/draggable.js rename to tests/unit/draggable/draggable_core.js diff --git a/tests/unit/draggable/draggable_defaults.js b/tests/unit/draggable/draggable_defaults.js index 923c705b1..493ed9087 100644 --- a/tests/unit/draggable/draggable_defaults.js +++ b/tests/unit/draggable/draggable_defaults.js @@ -1,17 +1,35 @@ /* * draggable_defaults.js */ -(function($) { -module("draggable: defaults"); +var draggable_defaults = { + appendTo: "parent", + axis: false, + cancel: ":input,option", + connectToSortable: false, + containment: false, + cursor: "auto", + cursorAt: false, + delay: 0, + disabled: false, + distance: 1, + grid: false, + handle: false, + helper: "original", + iframeFix: false, + opacity: false, + refreshPositions: false, + revert: false, + revertDuration: 500, + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + scope: "default", + snap: false, + snapMode: "both", + snapTolerance: 20, + stack: false, + zIndex: false +}; -test("defaults", function() { - el = $('
').draggable(); - $.each(draggable_defaults, function(key, val) { - var actual = el.data(key + ".draggable"), expected = val; - same(actual, expected, key); - }); - el.remove(); -}); - -})(jQuery); +commonWidgetTests('draggable', { defaults: draggable_defaults }); diff --git a/tests/unit/draggable/draggable_tickets.js b/tests/unit/draggable/draggable_tickets.js index 049abe890..709e55104 100644 --- a/tests/unit/draggable/draggable_tickets.js +++ b/tests/unit/draggable/draggable_tickets.js @@ -5,8 +5,4 @@ module("draggable: tickets"); -test("#1234", function() { - -}); - })(jQuery); -- 2.39.5