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/selectable/selectable_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/selectable/selectable_methods.js')
-rw-r--r-- | tests/unit/selectable/selectable_methods.js | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/tests/unit/selectable/selectable_methods.js b/tests/unit/selectable/selectable_methods.js index 4d1701440..06b75f9fc 100644 --- a/tests/unit/selectable/selectable_methods.js +++ b/tests/unit/selectable/selectable_methods.js @@ -21,17 +21,15 @@ test("init", function() { ok(true, 'arbitrary method called after init'); el = $("<div></div>").selectable() - var foo = el.data("foo.selectable"); + var foo = el.selectable("option", "foo"); el.remove(); ok(true, 'arbitrary option getter after init'); - $("<div></div>").selectable().data("foo.selectable", "bar").remove(); + $("<div></div>").selectable().selectable("option", "foo", "bar").remove(); ok(true, 'arbitrary option setter after init'); }); test("destroy", function() { - expect(7); - $("<div></div>").appendTo('body').selectable().selectable("destroy").remove(); ok(true, '.selectable("destroy") called on element'); @@ -44,14 +42,6 @@ test("destroy", function() { $("<div></div>").selectable().selectable("destroy").selectable("foo").remove(); ok(true, 'arbitrary method called after destroy'); - el = $("<div></div>").selectable(); - var foo = el.selectable("destroy").data("foo.selectable"); - el.remove(); - ok(true, 'arbitrary option getter after destroy'); - - $("<div></div>").selectable().selectable("destroy").data("foo.selectable", "bar").remove(); - ok(true, 'arbitrary option setter after destroy'); - var expected = $('<div></div>').selectable(), actual = expected.selectable('destroy'); equals(actual, expected, 'destroy is chainable'); |