Skip to content
Permalink
Browse files

Dialog: Added tests for isOpen method.

  • Loading branch information
scottgonzalez committed Aug 15, 2008
1 parent 2675acc commit 4705f5cc2e6b73bb6b3a5f25fcf4955f3478c715
Showing with 16 additions and 1 deletion.
  1. +16 −1 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 = $('<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() {

0 comments on commit 4705f5c

Please sign in to comment.
You can’t perform that action at this time.