diff options
author | Scott González <scott.gonzalez@gmail.com> | 2008-08-15 15:07:09 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2008-08-15 15:07:09 +0000 |
commit | 4705f5cc2e6b73bb6b3a5f25fcf4955f3478c715 (patch) | |
tree | b08da69d847ab473d39c4ce5dc09d142b393380d | |
parent | 2675acc088d8efd4cfe5489cad3cfcc021de51ce (diff) | |
download | jquery-ui-4705f5cc2e6b73bb6b3a5f25fcf4955f3478c715.tar.gz jquery-ui-4705f5cc2e6b73bb6b3a5f25fcf4955f3478c715.zip |
Dialog: Added tests for isOpen method.
-rw-r--r-- | tests/dialog.js | 17 |
1 files changed, 16 insertions, 1 deletions
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 = $('<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() {
|