|
5 | 5 |
|
6 | 6 | module("resizable: methods");
|
7 | 7 |
|
8 |
| -test("init", function() { |
9 |
| - expect(6); |
10 |
| - |
11 |
| - $("<div></div>").appendTo('body').resizable().remove(); |
12 |
| - ok(true, '.resizable() called on element'); |
13 |
| - |
14 |
| - $([]).resizable().remove(); |
15 |
| - ok(true, '.resizable() called on empty collection'); |
16 |
| - |
17 |
| - $('<div></div>').resizable().remove(); |
18 |
| - ok(true, '.resizable() called on disconnected DOMElement'); |
19 |
| - |
20 |
| - $('<div></div>').resizable().resizable("foo").remove(); |
21 |
| - ok(true, 'arbitrary method called after init'); |
22 |
| - |
23 |
| - el = $('<div></div>').resizable(); |
24 |
| - var foo = el.resizable("option", "foo"); |
25 |
| - el.remove(); |
26 |
| - ok(true, 'arbitrary option getter after init'); |
27 |
| - |
28 |
| - $('<div></div>').resizable().resizable("option", "foo", "bar").remove(); |
29 |
| - ok(true, 'arbitrary option setter after init'); |
30 |
| -}); |
31 |
| - |
32 |
| -test("destroy", function() { |
33 |
| - $("<div></div>").appendTo('body').resizable().resizable("destroy").remove(); |
34 |
| - ok(true, '.resizable("destroy") called on element'); |
35 |
| - |
36 |
| - $([]).resizable().resizable("destroy").remove(); |
37 |
| - ok(true, '.resizable("destroy") called on empty collection'); |
38 |
| - |
39 |
| - $('<div></div>').resizable().resizable("destroy").remove(); |
40 |
| - ok(true, '.resizable("destroy") called on disconnected DOMElement'); |
41 |
| - |
42 |
| - $('<div></div>').resizable().resizable("destroy").resizable("foo").remove(); |
43 |
| - ok(true, 'arbitrary method called after destroy'); |
44 |
| - |
45 |
| - var expected = $('<div></div>').resizable(), |
46 |
| - actual = expected.resizable('destroy'); |
47 |
| - equal(actual, expected, 'destroy is chainable'); |
48 |
| -}); |
49 |
| - |
50 |
| -test("enable", function() { |
51 |
| - var expected = $('<div></div>').resizable(), |
52 |
| - actual = expected.resizable('enable'); |
53 |
| - equal(actual, expected, 'enable is chainable'); |
54 |
| - ok(false, "missing test - untested code is broken code."); |
55 |
| -}); |
56 |
| - |
57 |
| -test("disable", function() { |
58 |
| - var expected = $('<div></div>').resizable(), |
59 |
| - actual = expected.resizable('disable'); |
60 |
| - equal(actual, expected, 'disable is chainable'); |
61 |
| - ok(false, "missing test - untested code is broken code."); |
62 |
| -}); |
63 | 8 |
|
64 | 9 | })(jQuery);
|
0 commit comments