]> source.dussan.org Git - jquery-ui.git/commitdiff
Slider: Test for test-option, setting the value with the value-method; either test...
authorjzaefferer <joern.zaefferer@gmail.com>
Sat, 27 Mar 2010 01:00:59 +0000 (02:00 +0100)
committerjzaefferer <joern.zaefferer@gmail.com>
Sat, 27 Mar 2010 01:00:59 +0000 (02:00 +0100)
tests/unit/slider/slider_options.js

index 88eb26a8fa62f0d04930975979b1633e32b36964..65d308e2695107a1f5d6c86ef118b590f4c1d11d 100644 (file)
@@ -93,7 +93,17 @@ test("range", function() {
 });
 
 test("step", function() {
-       ok(false, "missing test - untested code is broken code.");
+       var el = $('<div></div>').slider({
+               step: 10
+       });
+       equals( el.slider("value"), 0 )
+       el.slider("value", 1);
+       equals( el.slider("value"), 10 );
+       el.slider("value", 10);
+       equals( el.slider("value"), 10 );
+       el.slider("value", 11);
+       equals( el.slider("value"), 20 );
+       el.slider('destroy');
 });
 
 test("value", function() {