From 62f11b4a2ee8a8c10c51d614e37af1f0216385db Mon Sep 17 00:00:00 2001 From: Scott González Date: Thu, 16 Apr 2009 01:57:56 +0000 Subject: 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. --- tests/unit/progressbar/progressbar_methods.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/unit/progressbar') 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 = $('
').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); -- cgit v1.2.3