diff --git a/tests/dialog.js b/tests/dialog.js index 5cd1f1250..89560f779 100644 --- a/tests/dialog.js +++ b/tests/dialog.js @@ -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 = $('
').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 = $('
').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() {