aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/dialog/dialog_options.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/unit/dialog/dialog_options.js b/tests/unit/dialog/dialog_options.js
index 7254431fd..761f03b27 100644
--- a/tests/unit/dialog/dialog_options.js
+++ b/tests/unit/dialog/dialog_options.js
@@ -240,7 +240,16 @@ test("modal", function() {
ok(false, 'missing test - untested code is broken code');
});
-test("position", function() {
+test("position, default center on window", function() {
+ var el = $('<div></div>').dialog();
+ var offset = el.parent().offset();
+ // use .position() instead to avoid replicating center-logic?
+ same(offset.left, Math.floor($(window).width() / 2 - el.parent().width() / 2));
+ same(offset.top, Math.floor($(window).height() / 2 - el.parent().height() / 2));
+ el.remove();
+});
+
+test("position, others", function() {
ok(false, 'missing test - untested code is broken code');
});