aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/progressbar
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2009-04-16 01:57:56 +0000
committerScott González <scott.gonzalez@gmail.com>2009-04-16 01:57:56 +0000
commit62f11b4a2ee8a8c10c51d614e37af1f0216385db (patch)
tree0d9b556dbdaa19a3f0da85e2a0dc31621f123ef6 /tests/unit/progressbar
parent1195854aaad61308e7f5339eed54f92284d7666e (diff)
downloadjquery-ui-62f11b4a2ee8a8c10c51d614e37af1f0216385db.tar.gz
jquery-ui-62f11b4a2ee8a8c10c51d614e37af1f0216385db.zip
Progressbar: Modified value method to act as both a getter and setter. Fixed #4427 - progressbar('value') returns a reference to this instead of the value.
Diffstat (limited to 'tests/unit/progressbar')
-rw-r--r--tests/unit/progressbar/progressbar_methods.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/progressbar/progressbar_methods.js b/tests/unit/progressbar/progressbar_methods.js
index 9a162685b..a48fa3d47 100644
--- a/tests/unit/progressbar/progressbar_methods.js
+++ b/tests/unit/progressbar/progressbar_methods.js
@@ -24,4 +24,13 @@ test("destroy", function() {
equals(actual, expected, 'destroy is chainable');
});
+test('value', function() {
+ expect(3);
+
+ var el = $('<div></div>').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);