From: Ca-Phun Ung Date: Tue, 15 Sep 2009 16:14:15 +0000 (+0000) Subject: dialog: added unit test for ticket #4826 X-Git-Tag: 1.8a2~87 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f6b3e0c6e9b52e0c2aba7ae7224b6a1c9e2deb90;p=jquery-ui.git dialog: added unit test for ticket #4826 --- diff --git a/tests/unit/dialog/dialog_tickets.js b/tests/unit/dialog/dialog_tickets.js index 69697f9bd..d2fe271e6 100644 --- a/tests/unit/dialog/dialog_tickets.js +++ b/tests/unit/dialog/dialog_tickets.js @@ -5,4 +5,25 @@ module("dialog: tickets"); +test("#4826: setting resizable false toggles resizable on dialog", function() { + expect(6); + + el = $('
').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 = $('
').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);