\r
});\r
\r
-test("value", function() {\r
- expect(2);\r
- \r
- el = $('#spin').spinner({ value: 100 });\r
- \r
+test("value, default, specified in markup", function() {\r
+ var el = $('#spin2').spinner();\r
+ equals(el.val(), 2, "starting value");\r
+});\r
+\r
+test("value, default, nothing specified", function() {\r
+ var el = $('#spin').spinner();\r
+ equals(el.val(), 0, "starting value");\r
+});\r
+\r
+test("value, override", function() {\r
+ var el = $('#spin').spinner({ value: 100 });\r
equals(el.val(), 100, "starting value");\r
- \r
+});\r
+\r
+test("value, override markup", function() {\r
+ var el = $('#spin2').spinner({ value: 100 });\r
+ equals(el.val(), 100, "starting value");\r
+});\r
+\r
+test("value, override later", function() {\r
+ var el = $('#spin').spinner();\r
+ equals(el.val(), 0, "starting value");\r
el.spinner('option', 'value', 1000);\r
- \r
equals(el.val(), 1000, "value option changed and set as current value");\r
});\r
\r