aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/resizable/resizable_methods.js
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2009-02-04 04:47:39 +0000
committerRichard Worth <rdworth@gmail.com>2009-02-04 04:47:39 +0000
commit96b1534483a7f5557e0c6cc795ae90faed44c22d (patch)
tree4cf0eb4943c6b5319ab6cc30add5abca29b73084 /tests/unit/resizable/resizable_methods.js
parent04b304031193ff08f2aaac61ce65fefef025adea (diff)
downloadjquery-ui-96b1534483a7f5557e0c6cc795ae90faed44c22d.tar.gz
jquery-ui-96b1534483a7f5557e0c6cc795ae90faed44c22d.zip
resizable unit tests: split tests into individual files
Diffstat (limited to 'tests/unit/resizable/resizable_methods.js')
-rw-r--r--tests/unit/resizable/resizable_methods.js54
1 files changed, 53 insertions, 1 deletions
diff --git a/tests/unit/resizable/resizable_methods.js b/tests/unit/resizable/resizable_methods.js
index b5703cde6..43d573387 100644
--- a/tests/unit/resizable/resizable_methods.js
+++ b/tests/unit/resizable/resizable_methods.js
@@ -5,7 +5,59 @@
module("resizable: methods");
-test("testname", function() {
+test("init", function() {
+ expect(6);
+
+ $("<div></div>").appendTo('body').resizable().remove();
+ ok(true, '.resizable() called on element');
+
+ $([]).resizable().remove();
+ ok(true, '.resizable() called on empty collection');
+
+ $('<div></div>').resizable().remove();
+ ok(true, '.resizable() called on disconnected DOMElement');
+
+ $('<div></div>').resizable().resizable("foo").remove();
+ ok(true, 'arbitrary method called after init');
+
+ el = $('<div></div>').resizable()
+ var foo = el.data("foo.resizable");
+ el.remove();
+ ok(true, 'arbitrary option getter after init');
+
+ $('<div></div>').resizable().data("foo.resizable", "bar").remove();
+ ok(true, 'arbitrary option setter after init');
+});
+
+test("destroy", function() {
+ expect(6);
+
+ $("<div></div>").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');
+
+ $('<div></div>').resizable().resizable("destroy").remove();
+ ok(true, '.resizable("destroy") called on disconnected DOMElement');
+
+ $('<div></div>').resizable().resizable("destroy").resizable("foo").remove();
+ ok(true, 'arbitrary method called after destroy');
+
+ el = $('<div></div>').resizable();
+ var foo = el.resizable("destroy").data("foo.resizable");
+ el.remove();
+ ok(true, 'arbitrary option getter after destroy');
+
+ $('<div></div>').resizable().resizable("destroy").data("foo.resizable", "bar").remove();
+ ok(true, 'arbitrary option setter after destroy');
+});
+
+test("enable", function() {
+ ok(false, "missing test - untested code is broken code.");
+});
+
+test("disable", function() {
ok(false, "missing test - untested code is broken code.");
});