/* * resizable_methods.js */ (function($) { module("resizable: methods"); test("init", function() { expect(6); $("
").appendTo('body').resizable().remove(); ok(true, '.resizable() called on element'); $([]).resizable().remove(); ok(true, '.resizable() called on empty collection'); $('
').resizable().remove(); ok(true, '.resizable() called on disconnected DOMElement'); $('
').resizable().resizable("foo").remove(); ok(true, 'arbitrary method called after init'); el = $('
').resizable(); var foo = el.resizable("option", "foo"); el.remove(); ok(true, 'arbitrary option getter after init'); $('
').resizable().resizable("option", "foo", "bar").remove(); ok(true, 'arbitrary option setter after init'); }); test("destroy", function() { $("
").appendTo('body').resizable().resizable("destroy").remove(); ok(true, '.resizable("destroy") called on element'); $([]).resizable().resizable("destroy").remove(); ok(true, '.resizable("destroy") called on empty collection'); $('
').resizable().resizable("destroy").remove(); ok(true, '.resizable("destroy") called on disconnected DOMElement'); $('
').resizable().resizable("destroy").resizable("foo").remove(); ok(true, 'arbitrary method called after destroy'); var expected = $('
').resizable(), actual = expected.resizable('destroy'); equal(actual, expected, 'destroy is chainable'); }); test("enable", function() { var expected = $('
').resizable(), actual = expected.resizable('enable'); equal(actual, expected, 'enable is chainable'); ok(false, "missing test - untested code is broken code."); }); test("disable", function() { var expected = $('
').resizable(), actual = expected.resizable('disable'); equal(actual, expected, 'disable is chainable'); ok(false, "missing test - untested code is broken code."); }); })(jQuery);