aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/slider/slider_options.js22
1 files changed, 19 insertions, 3 deletions
diff --git a/tests/unit/slider/slider_options.js b/tests/unit/slider/slider_options.js
index 587f847cf..defb6f3b0 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( 2 );
+ expect( 4 );
element = $( "<div></div>" );
options = {
@@ -52,8 +52,24 @@ test( "max", function() {
};
element.slider( options );
- ok(element.slider( "option", "value" ) === options.value, "value option is not contained by max" );
- ok(element.slider( "value" ) === options.max, "value method is contained by max" );
+ ok( element.slider( "option", "value" ) === options.value, "value option is not contained by max" );
+ ok( element.slider( "value" ) === options.max, "value method is contained by max" );
+
+ options = {
+ max: 9,
+ min: 1,
+ orientation: "horizontal",
+ step: 3,
+ value: 8.75
+ };
+
+ element.slider( options );
+ ok( element.slider( "value" ) === 7, "value method is within max, edge Case" );
+
+ options.step = 2;
+
+ element.slider( options );
+ ok( element.slider( "value" ) === options.max, "value method will max, step is changed" );
element.slider( "destroy" );
});