Skip to content
Permalink
Browse files
Slider: Verify value constraint with a max that is a step mismatch
Ref #10078
Closes gh-1485
  • Loading branch information
atomiomi authored and scottgonzalez committed Mar 12, 2015
1 parent 01c8f88 commit 21831f5036bd695cc2734ec3f44e97549d2f7660
Showing 1 changed file with 11 additions and 1 deletion.
@@ -58,7 +58,7 @@ test( "disable", function( assert ) {
});

test( "value", function() {
expect( 18 );
expect( 19 );
$( [ false, "min", "max" ] ).each(function() {
var element = $( "<div></div>" ).slider({
range: this,
@@ -94,6 +94,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() {

0 comments on commit 21831f5

Please sign in to comment.