From: Richard Worth Date: Mon, 2 Feb 2009 13:23:51 +0000 (+0000) Subject: unit tests: minor updates X-Git-Tag: 1.6~104 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7ed45e68de02df14b72d536aa719a442ed116dfa;p=jquery-ui.git unit tests: minor updates --- diff --git a/tests/unit/draggable/draggable_options.js b/tests/unit/draggable/draggable_options.js index 5703c90d4..9fc4f4de2 100644 --- a/tests/unit/draggable/draggable_options.js +++ b/tests/unit/draggable/draggable_options.js @@ -28,11 +28,15 @@ test("{ addClasses: true }, default", function() { el = $("
").draggable({ addClasses: true }); ok(el.is(".ui-draggable"), "'ui-draggable' class added"); + + el.draggable("destroy"); }); test("{ addClasses: false }", function() { el = $("
").draggable({ addClasses: false }); ok(!el.is(".ui-draggable"), "'ui-draggable' class not added"); + + el.draggable("destroy"); }); test("{ appendTo: 'parent' }, default", function() { diff --git a/tests/unit/droppable/droppable_defaults.js b/tests/unit/droppable/droppable_defaults.js index 1c175631b..7584f5ec8 100644 --- a/tests/unit/droppable/droppable_defaults.js +++ b/tests/unit/droppable/droppable_defaults.js @@ -3,9 +3,9 @@ */ var droppable_defaults = { - addClasses: true, accept: '*', activeClass: false, + addClasses: true, disabled: false, greedy: false, hoverClass: false, diff --git a/tests/unit/droppable/droppable_options.js b/tests/unit/droppable/droppable_options.js index c63429bc5..2f2dbf673 100644 --- a/tests/unit/droppable/droppable_options.js +++ b/tests/unit/droppable/droppable_options.js @@ -1,15 +1,21 @@ /* - * droppable_optinos.js + * droppable_options.js */ (function($) { module("droppable: options"); -test("accept, selector", function() { +test("{ accept '*' }, default ", function() { + equals(droppable_defaults.accept, '*'); + + ok(false, 'missing test - untested code is broken code'); +}); + +test("{ accept: Selector }", function() { ok(false, 'missing test - untested code is broken code'); }); -test("accept, fn", function() { +test("{ accept: function(draggable) }", function() { ok(false, 'missing test - untested code is broken code'); }); diff --git a/tests/unit/testsuite.js b/tests/unit/testsuite.js index e1a93ce89..05dfcbe1e 100644 --- a/tests/unit/testsuite.js +++ b/tests/unit/testsuite.js @@ -88,6 +88,6 @@ function commonWidgetTests(widget, settings) { module(widget + ": common widget"); testWidgetDefaults(widget, settings.defaults); -// testSettingOptions(widget, options); + testSettingOptions(widget, options); testWidgetOverrides(widget); }