diff options
author | Scott González <scott.gonzalez@gmail.com> | 2009-04-15 02:33:28 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2009-04-15 02:33:28 +0000 |
commit | 1195854aaad61308e7f5339eed54f92284d7666e (patch) | |
tree | 5991992a73f910d897967559332a15bd774816d8 /tests/unit/slider/slider_methods.js | |
parent | 3c7b61299333d1ec3f4d4d773b1ec4296129a98e (diff) | |
download | jquery-ui-1195854aaad61308e7f5339eed54f92284d7666e.tar.gz jquery-ui-1195854aaad61308e7f5339eed54f92284d7666e.zip |
Merged in widget-factory branch and added tests. Fixes #4411 - Widget factory should auto detect getters.
Diffstat (limited to 'tests/unit/slider/slider_methods.js')
-rw-r--r-- | tests/unit/slider/slider_methods.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/unit/slider/slider_methods.js b/tests/unit/slider/slider_methods.js index 05b8905b1..92d8237b9 100644 --- a/tests/unit/slider/slider_methods.js +++ b/tests/unit/slider/slider_methods.js @@ -30,7 +30,7 @@ test("init", function() { }); test("destroy", function() { - expect(8); + expect(9); $("<div></div>").appendTo('body').slider().slider("destroy").remove(); ok(true, '.slider("destroy") called on element'); @@ -59,13 +59,23 @@ test("destroy", function() { $('<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'); }); test("enable", function() { + var expected = $('<div></div>').slider(), + actual = expected.slider('enable'); + equals(actual, expected, 'enable is chainable'); ok(false, "missing test - untested code is broken code."); }); test("disable", function() { + var expected = $('<div></div>').slider(), + actual = expected.slider('disable'); + equals(actual, expected, 'disable is chainable'); ok(false, "missing test - untested code is broken code."); }); |