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/dialog/dialog_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/dialog/dialog_methods.js')
-rw-r--r-- | tests/unit/dialog/dialog_methods.js | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/tests/unit/dialog/dialog_methods.js b/tests/unit/dialog/dialog_methods.js index dcb2409d4..93d1b25db 100644 --- a/tests/unit/dialog/dialog_methods.js +++ b/tests/unit/dialog/dialog_methods.js @@ -28,17 +28,15 @@ test("init", function() { ok(true, 'arbitrary method called after init'); el = $('<div></div>').dialog(); - var foo = el.data("foo.dialog"); + var foo = el.dialog("option", "foo"); el.remove(); ok(true, 'arbitrary option getter after init'); - $('<div></div>').dialog().data("foo.dialog", "bar").remove(); + $('<div></div>').dialog().dialog("option", "foo", "bar").remove(); ok(true, 'arbitrary option setter after init'); }); test("destroy", function() { - expect(7); - $("<div></div>").appendTo('body').dialog().dialog("destroy").remove(); ok(true, '.dialog("destroy") called on element'); @@ -51,14 +49,6 @@ test("destroy", function() { $('<div></div>').dialog().dialog("destroy").dialog("foo").remove(); ok(true, 'arbitrary method called after destroy'); - el = $('<div></div>').dialog(); - var foo = el.dialog("destroy").data("foo.dialog"); - el.remove(); - ok(true, 'arbitrary option getter after destroy'); - - $('<div></div>').dialog().dialog("destroy").data("foo.dialog", "bar").remove(); - ok(true, 'arbitrary option setter after destroy'); - var expected = $('<div></div>').dialog(), actual = expected.dialog('destroy'); equals(actual, expected, 'destroy is chainable'); |