aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2010-03-17 15:58:22 +0000
committerRichard Worth <rdworth@gmail.com>2010-03-17 15:58:22 +0000
commite84a318e4670bed0d8690b0a7625df31d39aaf92 (patch)
treebe6b1e6bf9487d1e5687275d354590336db8b714
parent8b885b3d527a64db4317ef1d00e0cc87e2fe0582 (diff)
downloadjquery-ui-e84a318e4670bed0d8690b0a7625df31d39aaf92.tar.gz
jquery-ui-e84a318e4670bed0d8690b0a7625df31d39aaf92.zip
Slider unit tests: slider event change
-rw-r--r--tests/unit/slider/slider_events.js24
1 files changed, 23 insertions, 1 deletions
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)
@@ -61,6 +61,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>" )
.slider({
@@ -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() {