aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/spinner
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2010-10-26 12:44:32 +0200
committerjzaefferer <joern.zaefferer@gmail.com>2010-10-26 12:44:32 +0200
commitf667bb3c8d8c95a0c9493a68b1e6549ba43fcd89 (patch)
treefba7e245d877306b04b404bb6fc0c3fc77c5b6b4 /tests/unit/spinner
parent134205840bb89b2a473cc003769d9a9a515157db (diff)
downloadjquery-ui-f667bb3c8d8c95a0c9493a68b1e6549ba43fcd89.tar.gz
jquery-ui-f667bb3c8d8c95a0c9493a68b1e6549ba43fcd89.zip
Slider: Some more refactoring and cleanup
Diffstat (limited to 'tests/unit/spinner')
-rw-r--r--tests/unit/spinner/spinner_core.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/unit/spinner/spinner_core.js b/tests/unit/spinner/spinner_core.js
index 6e3edafc8..88603708f 100644
--- a/tests/unit/spinner/spinner_core.js
+++ b/tests/unit/spinner/spinner_core.js
@@ -35,7 +35,7 @@ test("keydown UP on input, increases value not greater than max", function() {
}
equals(el.val(), 100);
- el.val(50);
+ el.spinner("value", 50);
simulateKeyDownUp(el, $.ui.keyCode.UP);
equals(el.val(), 60);
});
@@ -55,7 +55,7 @@ test("keydown DOWN on input, decreases value not less than min", function() {
}
equals(el.val(), -100);
- el.val(50);
+ el.spinner("value", 50);
simulateKeyDownUp(el, $.ui.keyCode.DOWN);
equals(el.val(), 40);
});
@@ -75,7 +75,7 @@ test("keydown PGUP on input, increases value not greater than max", function() {
}
equal(el.val(), 500);
- el.val(0);
+ el.spinner("value", 0);
simulateKeyDownUp(el, $.ui.keyCode.PAGE_UP);
equals(el.val(), 100);
});
@@ -95,7 +95,7 @@ test("keydown PGDN on input, decreases value not less than min", function() {
}
equals(el.val(), -500);
- el.val(0);
+ el.spinner("value", 0);
simulateKeyDownUp(el, $.ui.keyCode.PAGE_DOWN);
equals(el.val(), -100);
});
@@ -110,11 +110,11 @@ test("mouse click on buttons", function() {
$(".ui-spinner-down").trigger("mousedown").trigger("mouseup");
equals(el.val(), --val, "mouse click to down");
- el.val(50);
+ el.spinner("value", 50);
$(".ui-spinner-up").trigger("mousedown").trigger("mouseup");
equals(el.val(), 51);
- el.val(50);
+ el.spinner("value", 50);
$(".ui-spinner-down").trigger("mousedown").trigger("mouseup");
equals(el.val(), 49);
});