]> source.dussan.org Git - jquery-ui.git/commitdiff
dialog: added unit test for ticket #4826
authorCa-Phun Ung <pazu2k@gmail.com>
Tue, 15 Sep 2009 16:14:15 +0000 (16:14 +0000)
committerCa-Phun Ung <pazu2k@gmail.com>
Tue, 15 Sep 2009 16:14:15 +0000 (16:14 +0000)
tests/unit/dialog/dialog_tickets.js

index 69697f9bd9947dae3e43f5e5edce98311f617a42..d2fe271e688684f6e230ba1b4491f2674b4b854c 100644 (file)
@@ -5,4 +5,25 @@
 
 module("dialog: tickets");
 
+test("#4826: setting resizable false toggles resizable on dialog", function() {
+       expect(6);
+
+       el = $('<div></div>').dialog({ resizable: false });
+       shouldnotresize("[default]");
+       for (var i=0; i<2; i++) {
+               el.dialog('close').dialog('open');
+               shouldnotresize('initialized with resizable false toggle ('+ (i+1) +')');               
+       }
+       el.remove();
+
+       el = $('<div></div>').dialog({ resizable: true });
+       shouldresize("[default]");
+       for (var i=0; i<2; i++) {
+               el.dialog('close').dialog('option', 'resizable', false).dialog('open');
+               shouldnotresize('set option resizable false toggle ('+ (i+1) +')');             
+       }
+       el.remove();
+       
+});
+
 })(jQuery);