aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/progressbar
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/progressbar')
-rw-r--r--tests/unit/progressbar/progressbar_defaults.js3
-rw-r--r--tests/unit/progressbar/progressbar_events.js13
-rw-r--r--tests/unit/progressbar/progressbar_options.js8
3 files changed, 23 insertions, 1 deletions
diff --git a/tests/unit/progressbar/progressbar_defaults.js b/tests/unit/progressbar/progressbar_defaults.js
index b663708ce..925510871 100644
--- a/tests/unit/progressbar/progressbar_defaults.js
+++ b/tests/unit/progressbar/progressbar_defaults.js
@@ -4,7 +4,8 @@
var progressbar_defaults = {
disabled: false,
- value: 0
+ value: 0,
+ max: 100
};
commonWidgetTests('progressbar', { defaults: progressbar_defaults });
diff --git a/tests/unit/progressbar/progressbar_events.js b/tests/unit/progressbar/progressbar_events.js
index 22b301abe..585c09091 100644
--- a/tests/unit/progressbar/progressbar_events.js
+++ b/tests/unit/progressbar/progressbar_events.js
@@ -5,6 +5,19 @@
module("progressbar: events");
+test("create", function() {
+ expect(1);
+ $("#progressbar").progressbar({
+ value: 5,
+ create: function() {
+ same(5, $(this).progressbar("value") );
+ },
+ change: function() {
+ ok(false, 'create() has triggered change()');
+ }
+ })
+});
+
test("change", function() {
expect(1);
$("#progressbar").progressbar({
diff --git a/tests/unit/progressbar/progressbar_options.js b/tests/unit/progressbar/progressbar_options.js
index 269f93779..70ad7abab 100644
--- a/tests/unit/progressbar/progressbar_options.js
+++ b/tests/unit/progressbar/progressbar_options.js
@@ -31,4 +31,12 @@ test("{ value : 105 }", function() {
same( 100, $("#progressbar").progressbar("value") );
});
+test("{ max : 5, value : 10 }", function() {
+ $("#progressbar").progressbar({
+ max: 5,
+ value: 10
+ });
+ same( 5, $("#progressbar").progressbar("value") );
+});
+
})(jQuery);