From 240b22b1439df22408c5782e640e98cb335c7a2e Mon Sep 17 00:00:00 2001 From: kborchers Date: Tue, 29 May 2012 23:11:42 -0500 Subject: Dialog: Use new uniqueId method for generating id's --- tests/unit/dialog/dialog_core.js | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'tests') diff --git a/tests/unit/dialog/dialog_core.js b/tests/unit/dialog/dialog_core.js index 5d7beb99b..636b957e8 100644 --- a/tests/unit/dialog/dialog_core.js +++ b/tests/unit/dialog/dialog_core.js @@ -89,26 +89,11 @@ function margin(el, side) { module("dialog: core"); test("title id", function() { - expect(3); - - var titleId; - - // reset the uuid so we know what values to expect - $.ui.dialog.uuid = 0; + expect(1); el = $('
').dialog(); - titleId = dlg().find('.ui-dialog-title').attr('id'); - equal(titleId, 'ui-dialog-title-1', 'auto-numbered title id'); - el.remove(); - - el = $('
').dialog(); - titleId = dlg().find('.ui-dialog-title').attr('id'); - equal(titleId, 'ui-dialog-title-2', 'auto-numbered title id'); - el.remove(); - - el = $('
').dialog(); - titleId = dlg().find('.ui-dialog-title').attr('id'); - equal(titleId, 'ui-dialog-title-foo', 'carried over title id'); + var titleId = dlg().find('.ui-dialog-title').attr('id'); + ok( /ui-id-\d+$/.test( titleId ), 'auto-numbered title id'); el.remove(); }); -- cgit v1.2.3