Skip to content

Commit d969e66

Browse files
committed
Slider: Test for test-option, setting the value with the value-method; either test is wrong or the implementation ignores the step-option when set programmatically
1 parent 4941198 commit d969e66

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/unit/slider/slider_options.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,17 @@ test("range", function() {
9393
});
9494

9595
test("step", function() {
96-
ok(false, "missing test - untested code is broken code.");
96+
var el = $('<div></div>').slider({
97+
step: 10
98+
});
99+
equals( el.slider("value"), 0 )
100+
el.slider("value", 1);
101+
equals( el.slider("value"), 10 );
102+
el.slider("value", 10);
103+
equals( el.slider("value"), 10 );
104+
el.slider("value", 11);
105+
equals( el.slider("value"), 20 );
106+
el.slider('destroy');
97107
});
98108

99109
test("value", function() {

0 commit comments

Comments
 (0)