@@ -40,7 +40,7 @@ test( "disabled", function(){
40
40
} ) ;
41
41
42
42
test ( "max" , function ( ) {
43
- expect ( 5 ) ;
43
+ expect ( 7 ) ;
44
44
element = $ ( "<div></div>" ) ;
45
45
46
46
options = {
@@ -54,7 +54,7 @@ test( "max", function() {
54
54
element . slider ( options ) ;
55
55
ok ( element . slider ( "option" , "value" ) === options . value , "value option is not contained by max" ) ;
56
56
ok ( element . slider ( "value" ) === options . max , "value method is contained by max" ) ;
57
-
57
+
58
58
options = {
59
59
max : 9 ,
60
60
min : 1 ,
@@ -65,7 +65,7 @@ test( "max", function() {
65
65
66
66
element . slider ( options ) ;
67
67
ok ( element . slider ( "value" ) === 7 , "value method is within max, edge Case" ) ;
68
-
68
+
69
69
options . step = 2 ;
70
70
71
71
element . slider ( options ) ;
@@ -84,7 +84,24 @@ test( "max", function() {
84
84
ok ( element . slider ( "value" ) === options . max , "value method will max, step is changed and step is float" ) ;
85
85
element . slider ( "destroy" ) ;
86
86
87
- } ) ;
87
+ options = {
88
+ max : 10.75 ,
89
+ min : 1.22 ,
90
+ orientation : "horizontal" ,
91
+ step : 0.01 ,
92
+ value : 10.75
93
+ } ;
94
+
95
+ element . slider ( options ) ;
96
+ ok ( element . slider ( "value" ) === options . max , "value method will max, step is changed, step is float and max is float" ) ;
97
+ element . slider ( "destroy" ) ;
98
+
99
+ options . max = 10.749999999 ;
100
+
101
+ element . slider ( options ) ;
102
+ ok ( element . slider ( "value" ) === 10.74 , "value method will max, step is changed, step is float, max is float and not divisible" ) ;
103
+ element . slider ( "destroy" ) ;
104
+ } ) ;
88
105
89
106
test ( "min" , function ( ) {
90
107
expect ( 2 ) ;
0 commit comments