Skip to content
Permalink
Browse files

Slider unit tests: slider event change

  • Loading branch information...
rdworth committed Mar 17, 2010
1 parent 8b885b3 commit e84a318e4670bed0d8690b0a7625df31d39aaf92
Showing with 23 additions and 1 deletion.
  1. +23 −1 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 = $( "<div></div>" )
.slider({
values: [ 10, 20 ],
change: function(event, ui) {
ok( true, "change triggered by values method" );
}
})
.slider( "values", [80, 90] );

reset();
// Test value option
el = $( "<div></div>" )
@@ -70,6 +81,17 @@ test( "change", function() {
})
.slider( "option", "value", 0 );

reset();
// Test values option
el = $( "<div></div>" )
.slider({
values: [ 10, 20 ],
change: function(event, ui) {
ok( true, "change triggered by values option" );
}
})
.slider( "option", "values", [80, 90] );

});

test( "stop", function() {

0 comments on commit e84a318

Please sign in to comment.
You can’t perform that action at this time.