From: Jörn Zaefferer Date: Fri, 11 Sep 2009 18:47:34 +0000 (+0000) Subject: progressbar: implemented missing tests X-Git-Tag: 1.8a2~110 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fde0b18eea4bafd8e398a5ef4a58aadc818cae10;p=jquery-ui.git progressbar: implemented missing tests --- diff --git a/tests/unit/progressbar/progressbar_events.js b/tests/unit/progressbar/progressbar_events.js index 6b73e2e8d..b273cd5e9 100644 --- a/tests/unit/progressbar/progressbar_events.js +++ b/tests/unit/progressbar/progressbar_events.js @@ -6,7 +6,12 @@ module("progressbar: events"); test("change", function() { - ok(false, "missing test - untested code is broken code."); + expect(1); + $("#progressbar").progressbar({ + change: function() { + same( 5, $(this).progressbar("value") ); + } + }).progressbar("value", 5); }); })(jQuery); diff --git a/tests/unit/progressbar/progressbar_options.js b/tests/unit/progressbar/progressbar_options.js index f6069a5de..a60b0efaf 100644 --- a/tests/unit/progressbar/progressbar_options.js +++ b/tests/unit/progressbar/progressbar_options.js @@ -6,7 +6,15 @@ module("progressbar: options"); test("{ value : 0 }, default", function() { - ok(false, "missing test - untested code is broken code."); + $("#progressbar").progressbar(); + same( 0, $("#progressbar").progressbar("value") ); +}); + +test("{ value : 5 }", function() { + $("#progressbar").progressbar({ + value: 5 + }); + same( 5, $("#progressbar").progressbar("value") ); }); })(jQuery);