From b3a095d3ef7a186fe27fe19a0a40eeb496978284 Mon Sep 17 00:00:00 2001 From: Scott González Date: Mon, 9 Nov 2009 01:50:23 +0000 Subject: 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. --- tests/unit/selectable/selectable_methods.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'tests/unit/selectable/selectable_methods.js') 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 = $("
").selectable() - var foo = el.data("foo.selectable"); + var foo = el.selectable("option", "foo"); el.remove(); ok(true, 'arbitrary option getter after init'); - $("
").selectable().data("foo.selectable", "bar").remove(); + $("
").selectable().selectable("option", "foo", "bar").remove(); ok(true, 'arbitrary option setter after init'); }); test("destroy", function() { - expect(7); - $("
").appendTo('body').selectable().selectable("destroy").remove(); ok(true, '.selectable("destroy") called on element'); @@ -44,14 +42,6 @@ test("destroy", function() { $("
").selectable().selectable("destroy").selectable("foo").remove(); ok(true, 'arbitrary method called after destroy'); - el = $("
").selectable(); - var foo = el.selectable("destroy").data("foo.selectable"); - el.remove(); - ok(true, 'arbitrary option getter after destroy'); - - $("
").selectable().selectable("destroy").data("foo.selectable", "bar").remove(); - ok(true, 'arbitrary option setter after destroy'); - var expected = $('
').selectable(), actual = expected.selectable('destroy'); equals(actual, expected, 'destroy is chainable'); -- cgit v1.2.3