]> source.dussan.org Git - jquery-ui.git/commitdiff
progressbar: implemented missing tests
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Fri, 11 Sep 2009 18:47:34 +0000 (18:47 +0000)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Fri, 11 Sep 2009 18:47:34 +0000 (18:47 +0000)
tests/unit/progressbar/progressbar_events.js
tests/unit/progressbar/progressbar_options.js

index 6b73e2e8d4d81353d303ed95ba885eb3748b11f5..b273cd5e99427f6add8d5eee1f122142280f87d8 100644 (file)
@@ -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);
index f6069a5dee600371cee569ea72c8df0027ffd590..a60b0efaf210287d00f620c258165d216ed3feb1 100644 (file)
@@ -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);