From 3909e6d89e01e4cd8777377c63037896bb95aa2f Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Fri, 25 Nov 2011 21:18:19 +0100 Subject: new jq layout --- .../tests/unit/progressbar/progressbar_methods.js | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/main/webapp/jquery-ui-1.9pre/tests/unit/progressbar/progressbar_methods.js (limited to 'src/main/webapp/jquery-ui-1.9pre/tests/unit/progressbar/progressbar_methods.js') diff --git a/src/main/webapp/jquery-ui-1.9pre/tests/unit/progressbar/progressbar_methods.js b/src/main/webapp/jquery-ui-1.9pre/tests/unit/progressbar/progressbar_methods.js new file mode 100644 index 0000000..a48fa3d --- /dev/null +++ b/src/main/webapp/jquery-ui-1.9pre/tests/unit/progressbar/progressbar_methods.js @@ -0,0 +1,36 @@ +/* + * progressbar_methods.js + */ +(function($) { + +module("progressbar: methods"); + +test("init", function() { + expect(1); + + $("
").appendTo('body').progressbar().remove(); + ok(true, '.progressbar() called on element'); + +}); + +test("destroy", function() { + expect(2); + + $("
").appendTo('body').progressbar().progressbar("destroy").remove(); + ok(true, '.progressbar("destroy") called on element'); + + var expected = $('
').progressbar(), + actual = expected.progressbar('destroy'); + equals(actual, expected, 'destroy is chainable'); +}); + +test('value', function() { + expect(3); + + var el = $('
').progressbar({ value: 20 }); + equals(el.progressbar('value'), 20, 'correct value as getter'); + equals(el.progressbar('value', 30), el, 'chainable as setter'); + equals(el.progressbar('option', 'value'), 30, 'correct value after setter'); +}); + +})(jQuery); -- cgit v1.1