aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKris Borchers <kris.borchers@gmail.com>2012-11-08 12:02:25 -0600
committerKris Borchers <kris.borchers@gmail.com>2012-11-08 12:02:25 -0600
commit8976bc7e3d1f03254f914297b1be1b730690d2b8 (patch)
tree09039ae834d90a465a078b658613acf4ced89992 /tests
parent1e19e5e90bd801540e98c67f583a2f5aa30ffb53 (diff)
downloadjquery-ui-8976bc7e3d1f03254f914297b1be1b730690d2b8.tar.gz
jquery-ui-8976bc7e3d1f03254f914297b1be1b730690d2b8.zip
Progressbar: Refactor to better handle option changes and sanitize values. Fixes #8785 - Progressbar: Remove _value() and always sanitize value option
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/progressbar/progressbar_options.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/unit/progressbar/progressbar_options.js b/tests/unit/progressbar/progressbar_options.js
index fd5988ebd..e4d9b7ab8 100644
--- a/tests/unit/progressbar/progressbar_options.js
+++ b/tests/unit/progressbar/progressbar_options.js
@@ -60,3 +60,21 @@ test( "{ max : 5, value : 10 }", function() {
});
deepEqual( 5, $( "#progressbar" ).progressbar( "value" ) );
});
+
+test( "{ value : 10, max : 5 }", function() {
+ expect( 1 );
+ $("#progressbar").progressbar({
+ max: 5,
+ value: 10
+ });
+ deepEqual( 5, $( "#progressbar" ).progressbar( "value" ) );
+});
+
+test( "{ max : 5 }", function() {
+ expect( 1 );
+ $("#progressbar").progressbar({
+ max: 10,
+ value: 10
+ }).progressbar( "option", "max", 5 );
+ deepEqual( 5, $( "#progressbar" ).progressbar( "value" ) );
+});