diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-03-28 17:34:04 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-03-28 17:34:57 -0400 |
commit | 8310d185b3a5fc8f433f0736a22298e84ac73f7d (patch) | |
tree | 3d7e3e4cf5263a9ddc6514374aa8eb6b8574894d /tests/unit/slider | |
parent | eb3d95543870447d1194f6e9e7c43c6d2637a35f (diff) | |
download | jquery-ui-8310d185b3a5fc8f433f0736a22298e84ac73f7d.tar.gz jquery-ui-8310d185b3a5fc8f433f0736a22298e84ac73f7d.zip |
Slider: Properly handle value and value methods as setters. Fixes #4881 - Slider: value and values methods as setters aren't chainable.
(cherry picked from commit 2197c61f1f91a7b5046fb994d370f38ded602ee6)
Diffstat (limited to 'tests/unit/slider')
-rw-r--r-- | tests/unit/slider/slider_methods.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/slider/slider_methods.js b/tests/unit/slider/slider_methods.js index 77ae65148..4b2b0311d 100644 --- a/tests/unit/slider/slider_methods.js +++ b/tests/unit/slider/slider_methods.js @@ -74,7 +74,7 @@ test("value", function() { value: 5 }); equals(el.slider('value'), 5, 'range: ' + this + ' slider method get'); - el.slider('value', 10); + equals(el.slider('value', 10), el, 'value method is chainable'); equals(el.slider('value'), 10, 'range: ' + this + ' slider method set'); el.remove(); }); @@ -85,13 +85,13 @@ test("value", function() { el.slider('option', 'value', -2); equals(el.slider('option', 'value'), -2, 'value option does not respect min'); equals(el.slider('value'), -1, 'value method get respects min'); - el.slider('value', -2); + equals(el.slider('value', -2), el, 'value method is chainable'); equals(el.slider('option', 'value'), -1, 'value method set respects min'); // max with value option vs value method el.slider('option', 'value', 2); equals(el.slider('option', 'value'), 2, 'value option does not respect max'); equals(el.slider('value'), 1, 'value method get respects max'); - el.slider('value', 2); + equals(el.slider('value', 2), el, 'value method is chainable'); equals(el.slider('option', 'value'), 1, 'value method set respects max'); }); |