From: Richard Worth Date: Wed, 17 Mar 2010 15:58:22 +0000 (+0000) Subject: Slider unit tests: slider event change X-Git-Tag: 1.8~11 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e84a318e4670bed0d8690b0a7625df31d39aaf92;p=jquery-ui.git Slider unit tests: slider event change --- diff --git a/tests/unit/slider/slider_events.js b/tests/unit/slider/slider_events.js index a3d6c5282..dd68a74b6 100644 --- a/tests/unit/slider/slider_events.js +++ b/tests/unit/slider/slider_events.js @@ -20,7 +20,7 @@ test( "slide", function() { // value (even if same as previous value), via mouse(mouseup) or keyboard(keyup) // or value method/option" test( "change", function() { - expect(4); + expect(7); var handle; // Test mouseup at end of handle slide (mouse) @@ -60,6 +60,17 @@ test( "change", function() { }) .slider( "value", 0 ); + reset(); + // Test values method + el = $( "
" ) + .slider({ + values: [ 10, 20 ], + change: function(event, ui) { + ok( true, "change triggered by values method" ); + } + }) + .slider( "values", [80, 90] ); + reset(); // Test value option el = $( "
" ) @@ -70,6 +81,17 @@ test( "change", function() { }) .slider( "option", "value", 0 ); + reset(); + // Test values option + el = $( "
" ) + .slider({ + values: [ 10, 20 ], + change: function(event, ui) { + ok( true, "change triggered by values option" ); + } + }) + .slider( "option", "values", [80, 90] ); + }); test( "stop", function() {