aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/slider
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2009-11-09 01:50:23 +0000
committerScott González <scott.gonzalez@gmail.com>2009-11-09 01:50:23 +0000
commitb3a095d3ef7a186fe27fe19a0a40eeb496978284 (patch)
tree03dadba8a399ab3457406a7de5c3f507bc92baf5 /tests/unit/slider
parentb0733bbe59c17e49dcc8ee6dc98efe15c0c4ca8e (diff)
downloadjquery-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/slider')
-rw-r--r--tests/unit/slider/slider_methods.js22
1 files changed, 2 insertions, 20 deletions
diff --git a/tests/unit/slider/slider_methods.js b/tests/unit/slider/slider_methods.js
index 428ca73f7..65eb4e8d5 100644
--- a/tests/unit/slider/slider_methods.js
+++ b/tests/unit/slider/slider_methods.js
@@ -21,17 +21,15 @@ test("init", function() {
ok(true, 'arbitrary method called after init');
var el = $('<div></div>').slider();
- var foo = el.data("foo.slider");
+ var foo = el.slider("option", "foo");
el.remove();
ok(true, 'arbitrary option getter after init');
- $('<div></div>').slider().data("foo.slider", "bar").remove();
+ $('<div></div>').slider().slider("option", "foo", "bar").remove();
ok(true, 'arbitrary option setter after init');
});
test("destroy", function() {
- expect(9);
-
$("<div></div>").appendTo('body').slider().slider("destroy").remove();
ok(true, '.slider("destroy") called on element');
@@ -44,22 +42,6 @@ test("destroy", function() {
$('<div></div>').slider().slider("destroy").slider("foo").remove();
ok(true, 'arbitrary method called after destroy');
- var el = $('<div></div>').slider();
- var foo = el.slider("destroy").data("foo.slider");
- el.remove();
- ok(true, 'arbitrary option getter (.data) after destroy');
-
- el = $('<div></div>').slider();
- var foo = el.slider("destroy").slider("option", "foo");
- el.remove();
- ok(true, 'arbitrary option getter (.slider option method) after destroy');
-
- $('<div></div>').slider().slider("destroy").data("foo.slider", "bar").remove();
- ok(true, 'arbitrary option setter (.data) after destroy');
-
- $('<div></div>').slider().slider("destroy").slider("options", "foo", "bar").remove();
- ok(true, 'arbitrary option setter (.slider option method) after destroy');
-
var expected = $('<div></div>').slider(),
actual = expected.slider('destroy');
equals(actual, expected, 'destroy is chainable');