Last change
on this file since 24245 was 24245, checked in by sjb48, 13 years ago |
Oran code for supporting format changes to document.
|
-
Property svn:executable
set to
*
|
File size:
919 bytes
|
Line | |
---|
1 | /*
|
---|
2 | * progressbar_methods.js
|
---|
3 | */
|
---|
4 | (function($) {
|
---|
5 |
|
---|
6 | module("progressbar: methods");
|
---|
7 |
|
---|
8 | test("init", function() {
|
---|
9 | expect(1);
|
---|
10 |
|
---|
11 | $("<div></div>").appendTo('body').progressbar().remove();
|
---|
12 | ok(true, '.progressbar() called on element');
|
---|
13 |
|
---|
14 | });
|
---|
15 |
|
---|
16 | test("destroy", function() {
|
---|
17 | expect(2);
|
---|
18 |
|
---|
19 | $("<div></div>").appendTo('body').progressbar().progressbar("destroy").remove();
|
---|
20 | ok(true, '.progressbar("destroy") called on element');
|
---|
21 |
|
---|
22 | var expected = $('<div></div>').progressbar(),
|
---|
23 | actual = expected.progressbar('destroy');
|
---|
24 | equals(actual, expected, 'destroy is chainable');
|
---|
25 | });
|
---|
26 |
|
---|
27 | test('value', function() {
|
---|
28 | expect(3);
|
---|
29 |
|
---|
30 | var el = $('<div></div>').progressbar({ value: 20 });
|
---|
31 | equals(el.progressbar('value'), 20, 'correct value as getter');
|
---|
32 | equals(el.progressbar('value', 30), el, 'chainable as setter');
|
---|
33 | equals(el.progressbar('option', 'value'), 30, 'correct value after setter');
|
---|
34 | });
|
---|
35 |
|
---|
36 | })(jQuery);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.