diff options
author | Scott González <scott.gonzalez@gmail.com> | 2009-11-09 01:50:23 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2009-11-09 01:50:23 +0000 |
commit | b3a095d3ef7a186fe27fe19a0a40eeb496978284 (patch) | |
tree | 03dadba8a399ab3457406a7de5c3f507bc92baf5 /tests/unit/droppable/droppable_methods.js | |
parent | b0733bbe59c17e49dcc8ee6dc98efe15c0c4ca8e (diff) | |
download | jquery-ui-b3a095d3ef7a186fe27fe19a0a40eeb496978284.tar.gz jquery-ui-b3a095d3ef7a186fe27fe19a0a40eeb496978284.zip |
Removed use of .data() for getting/setting options in tests; using each plugin's option method instead. Fixes #4853 - Remove use of .data() for options in tests.
Diffstat (limited to 'tests/unit/droppable/droppable_methods.js')
-rw-r--r-- | tests/unit/droppable/droppable_methods.js | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/tests/unit/droppable/droppable_methods.js b/tests/unit/droppable/droppable_methods.js index 51cb65e74..87b916888 100644 --- a/tests/unit/droppable/droppable_methods.js +++ b/tests/unit/droppable/droppable_methods.js @@ -20,16 +20,14 @@ test("init", function() { $("<div></div>").droppable().droppable("foo"); ok(true, 'arbitrary method called after init'); - $("<div></div>").droppable().data("foo.droppable"); + $("<div></div>").droppable().droppable("option", "foo"); ok(true, 'arbitrary option getter after init'); - $("<div></div>").droppable().data("foo.droppable", "bar"); + $("<div></div>").droppable().droppable("option", "foo", "bar"); ok(true, 'arbitrary option setter after init'); }); test("destroy", function() { - expect(7); - $("<div></div>").appendTo('body').droppable().droppable("destroy").remove(); ok(true, '.droppable("destroy") called on element'); @@ -41,12 +39,6 @@ test("destroy", function() { $("<div></div>").droppable().droppable("destroy").droppable("foo"); ok(true, 'arbitrary method called after destroy'); - - $("<div></div>").droppable().droppable("destroy").data("foo.droppable"); - ok(true, 'arbitrary option getter after destroy'); - - $("<div></div>").droppable().droppable("destroy").data("foo.droppable", "bar"); - ok(true, 'arbitrary option setter after destroy'); var expected = $('<div></div>').droppable(), actual = expected.droppable('destroy'); @@ -59,12 +51,12 @@ test("enable", function() { shouldNotBeDroppable(); el.droppable("enable"); shouldBeDroppable(); - equals(el.data("disabled.droppable"), false, "disabled.droppable getter"); + equals(el.droppable("option", "disabled"), false, "disabled option getter"); el.droppable("destroy"); el.droppable({ disabled: true }); shouldNotBeDroppable(); - el.data("disabled.droppable", false); - equals(el.data("disabled.droppable"), false, "disabled.droppable setter"); + el.droppable("option", "disabled", false); + equals(el.droppable("option", "disabled"), false, "disabled option setter"); shouldBeDroppable(); var expected = $('<div></div>').droppable(), @@ -78,12 +70,12 @@ test("disable", function() { shouldBeDroppable(); el.droppable("disable"); shouldNotBeDroppable(); - equals(el.data("disabled.droppable"), true, "disabled.droppable getter"); + equals(el.droppable("option", "disabled"), true, "disabled option getter"); el.droppable("destroy"); el.droppable({ disabled: false }); shouldBeDroppable(); - el.data("disabled.droppable", true); - equals(el.data("disabled.droppable"), true, "disabled.droppable setter"); + el.droppable("option", "disabled", true); + equals(el.droppable("option", "disabled"), true, "disabled option setter"); shouldNotBeDroppable(); var expected = $('<div></div>').droppable(), |