});
});
-test("enable", function() {
- expect( 3 );
-
- var el,
- expected = $('<div></div>').dialog(),
- actual = expected.dialog('enable');
- equal(actual, expected, 'enable is chainable');
-
- el = $('<div></div>').dialog({ disabled: true });
- el.dialog('enable');
- equal(el.dialog('option', 'disabled'), false, 'enable method sets disabled option to false');
- ok(!el.dialog('widget').hasClass('ui-dialog-disabled'), 'enable method removes ui-dialog-disabled class from ui-dialog element');
-});
-
-test("disable", function() {
- expect( 3 );
-
- var el,
- expected = $('<div></div>').dialog(),
- actual = expected.dialog('disable');
- equal(actual, expected, 'disable is chainable');
-
- el = $('<div></div>').dialog({ disabled: false });
- el.dialog('disable');
- equal(el.dialog('option', 'disabled'), true, 'disable method sets disabled option to true');
- ok(el.dialog('widget').hasClass('ui-dialog-disabled'), 'disable method adds ui-dialog-disabled class to ui-dialog element');
+test( "enable/disable disabled", function() {
+ expect( 2 );
+ var el = $( "<div></div>" ).dialog();
+ el.dialog( "disable" );
+ equal(el.dialog( "option", "disabled" ), false, "disable method doesn't do anything" );
+ ok( !el.dialog( "widget" ).hasClass( "ui-dialog-disabled" ), "disable method doesn't add ui-dialog-disabled class" );
});
test("close", function() {