aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/progressbar
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2009-09-11 18:47:34 +0000
committerJörn Zaefferer <joern.zaefferer@gmail.com>2009-09-11 18:47:34 +0000
commitfde0b18eea4bafd8e398a5ef4a58aadc818cae10 (patch)
treed2c049484a84481a27493d79d76b1ae899e00ef3 /tests/unit/progressbar
parent40f75ee65ccd0a7ed1686953132650bd65996d57 (diff)
downloadjquery-ui-fde0b18eea4bafd8e398a5ef4a58aadc818cae10.tar.gz
jquery-ui-fde0b18eea4bafd8e398a5ef4a58aadc818cae10.zip
progressbar: implemented missing tests
Diffstat (limited to 'tests/unit/progressbar')
-rw-r--r--tests/unit/progressbar/progressbar_events.js7
-rw-r--r--tests/unit/progressbar/progressbar_options.js10
2 files changed, 15 insertions, 2 deletions
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);