aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAblay Keldibek <atomio.ak@gmail.com>2015-03-12 13:26:24 +0600
committerScott González <scott.gonzalez@gmail.com>2016-06-09 12:08:29 -0400
commitd86df4b697b73c0e5ba971a912ae6d0b0385d512 (patch)
tree0b47d238d1736ad1ba6e2cb925f2b8673ac065f8 /tests
parentb2aa641c04fb00901c7de9acf1bdc59f65bbed25 (diff)
downloadjquery-ui-d86df4b697b73c0e5ba971a912ae6d0b0385d512.tar.gz
jquery-ui-d86df4b697b73c0e5ba971a912ae6d0b0385d512.zip
Slider: Verify value constraint with a max that is a step mismatch
Ref #10078 Closes gh-1485 (cherry picked from commit 21831f5036bd695cc2734ec3f44e97549d2f7660)
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/slider/slider_methods.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/unit/slider/slider_methods.js b/tests/unit/slider/slider_methods.js
index ce26620e2..1a82e6edf 100644
--- a/tests/unit/slider/slider_methods.js
+++ b/tests/unit/slider/slider_methods.js
@@ -62,7 +62,7 @@ test( "disable", function() {
});
test( "value", function() {
- expect( 18 );
+ expect( 19 );
$( [ false, "min", "max" ] ).each(function() {
var element = $( "<div></div>" ).slider({
range: this,
@@ -98,6 +98,16 @@ test( "value", function() {
});
element.slider( "option", "value", 2.4 );
equal( element.slider( "value" ), 2.4, "value is set to max with 0.01 step" );
+
+ element = $( "<div></div>" ).slider({
+ value: 100,
+ min: 10,
+ max: 500,
+ step: 50
+ });
+
+ element.slider( "option", "value", 510 );
+ equal( element.slider( "value" ), 460, "value is restricted to maximum valid step" );
});
//test( "values", function() {