From 7ed45e68de02df14b72d536aa719a442ed116dfa Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Mon, 2 Feb 2009 13:23:51 +0000 Subject: [PATCH] unit tests: minor updates --- tests/unit/draggable/draggable_options.js | 4 ++++ tests/unit/droppable/droppable_defaults.js | 2 +- tests/unit/droppable/droppable_options.js | 12 +++++++++--- tests/unit/testsuite.js | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/unit/draggable/draggable_options.js b/tests/unit/draggable/draggable_options.js index 5703c90d482..9fc4f4de209 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 1c175631b21..7584f5ec835 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 c63429bc53c..2f2dbf673f1 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 e1a93ce890e..05dfcbe1e77 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); }