Dialog: Added tests for isOpen method.

This commit is contained in:
Scott González 2008-08-15 15:07:09 +00:00
parent 2675acc088
commit 4705f5cc2e

View File

@ -23,7 +23,7 @@ var defaults = {
position: 'center',
resizable: true,
stack: true,
title: null,
title: '',
width: 300
};
@ -396,6 +396,21 @@ test("width", function() {
module("dialog: Methods");
test("isOpen", function() {
expect(4);
el = $('<div/>').dialog();
equals(el.dialog('isOpen'), true, "dialog is open after init");
el.dialog('close');
equals(el.dialog('isOpen'), false, "dialog is closed");
el.remove();
el = $('<div/>').dialog({autoOpen: false});
equals(el.dialog('isOpen'), false, "dialog is closed after init");
el.dialog('open');
equals(el.dialog('isOpen'), true, "dialog is open");
el.remove();
});
module("dialog: Callbacks");
test("open", function() {