aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit
diff options
context:
space:
mode:
authorJyoti Deka <dekajp@gmail.com>2015-01-09 20:06:32 -0500
committerScott González <scott.gonzalez@gmail.com>2015-02-09 11:59:38 -0500
commitdfa3a9f8c983f5206d49000a170b42581fcc5478 (patch)
treefbd28e26fabfb8f6b365ea6f16d53d656644c411 /tests/unit
parentfcb26aaded146e63ffdb9fcca46e308f9b877edd (diff)
downloadjquery-ui-dfa3a9f8c983f5206d49000a170b42581fcc5478.tar.gz
jquery-ui-dfa3a9f8c983f5206d49000a170b42581fcc5478.zip
Slider: Fix max calculation, when step is float
Fixes #10721 Closes gh-1398 (cherry picked from commit ae1d6d5f90236405023964bb3061eccd6c625e39)
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/slider/slider_options.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/unit/slider/slider_options.js b/tests/unit/slider/slider_options.js
index defb6f3b0..2badcc566 100644
--- a/tests/unit/slider/slider_options.js
+++ b/tests/unit/slider/slider_options.js
@@ -40,7 +40,7 @@ test( "disabled", function(){
});
test( "max", function() {
- expect( 4 );
+ expect( 5 );
element = $( "<div></div>" );
options = {
@@ -72,6 +72,18 @@ test( "max", function() {
ok( element.slider( "value" ) === options.max, "value method will max, step is changed" );
element.slider( "destroy" );
+ options = {
+ max: 60,
+ min: 50,
+ orientation: "horizontal",
+ step: 0.1,
+ value: 60
+ };
+
+ element.slider( options );
+ ok( element.slider( "value" ) === options.max, "value method will max, step is changed and step is float" );
+ element.slider( "destroy" );
+
});
test( "min", function() {