aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-11-16 11:20:58 -0500
committerScott González <scott.gonzalez@gmail.com>2012-11-16 11:20:58 -0500
commit8f46418c35e597e81ba043f15b25258ab54483f0 (patch)
treedd3554edaf07b866946e35fad91a4dc9081e844a /tests
parenta18863205e060bf9a145bb5ed90e36d8feb3c8f7 (diff)
downloadjquery-ui-8f46418c35e597e81ba043f15b25258ab54483f0.tar.gz
jquery-ui-8f46418c35e597e81ba043f15b25258ab54483f0.zip
Slider tests: Don't use QUnit.reset() or on().
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/slider/slider_events.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/unit/slider/slider_events.js b/tests/unit/slider/slider_events.js
index b6fa6698d..d5e7dff45 100644
--- a/tests/unit/slider/slider_events.js
+++ b/tests/unit/slider/slider_events.js
@@ -70,7 +70,6 @@ test( "programmatic event triggers", function() {
})
.slider( "value", 0 );
- QUnit.reset();
// Test values method
el = $( "<div></div>" )
.slider({
@@ -81,7 +80,6 @@ test( "programmatic event triggers", function() {
})
.slider( "values", [80, 90] );
- QUnit.reset();
// Test value option
el = $( "<div></div>" )
.slider({
@@ -91,7 +89,6 @@ test( "programmatic event triggers", function() {
})
.slider( "option", "value", 0 );
- QUnit.reset();
// Test values option
el = $( "<div></div>" )
.slider({
@@ -116,8 +113,8 @@ test( "mouse based interaction part two: when handles overlap", function() {
}),
handles = el.find( ".ui-slider-handle" );
handles.eq(0).simulate( "drag", { dx: 10 } );
+ el.slider( "destroy" );
- QUnit.reset();
el = $( "#slider1" )
.slider({
values: [ 10, 10, 10 ],
@@ -128,27 +125,27 @@ test( "mouse based interaction part two: when handles overlap", function() {
}),
handles = el.find( ".ui-slider-handle" );
handles.eq(0).simulate( "drag", { dx: -10 } );
+ el.slider( "destroy" );
- QUnit.reset();
el = $( "#slider1" )
.slider({
values: [ 19, 20 ]
}),
handles = el.find( ".ui-slider-handle" );
handles.eq(0).simulate( "drag", { dx: 10 } );
- el.on("slidestart", function(event, ui) {
+ el.one("slidestart", function(event, ui) {
equal(handles.index(ui.handle), 0, "left handle activated if left was moved last");
});
handles.eq(0).simulate( "drag", { dx: 10 } );
+ el.slider( "destroy" );
- QUnit.reset();
el = $( "#slider1" )
.slider({
values: [ 19, 20 ]
}),
handles = el.find( ".ui-slider-handle" );
handles.eq(1).simulate( "drag", { dx: -10 } );
- el.on("slidestart", function(event, ui) {
+ el.one("slidestart", function(event, ui) {
equal(handles.index(ui.handle), 1, "right handle activated if right was moved last (#3467)");
});
handles.eq(0).simulate( "drag", { dx: 10 } );