From 2c03d1a837154badb33263cb2b23ecbd43973857 Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Thu, 24 Apr 2008 14:22:35 -0500 Subject: [PATCH] Amended failing Element#identify test. --- CHANGELOG | 2 ++ test/unit/dom_test.js | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 599cd3d..89eab05 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Amended failing Element#identify test. + * Refactor unit tests. Unit tests are now dynamically generated from a JavaScript test file and optional HTML, JS and CSS fixtures. [Tobie Langel] * Fix issue where Safari improperly reports an element as a descendant of itself. diff --git a/test/unit/dom_test.js b/test/unit/dom_test.js index e60d3f5..7726a44 100644 --- a/test/unit/dom_test.js +++ b/test/unit/dom_test.js @@ -444,9 +444,11 @@ new Test.Unit.Runner({ testElementIdentify: function() { var parent = $('identification'); this.assertEqual(parent.down().identify(), 'predefined_id'); - this.assertEqual(parent.down(1).identify(), 'anonymous_element_1'); - this.assertEqual(parent.down(2).identify(), 'anonymous_element_2'); - this.assertEqual(parent.down(3).identify(), 'anonymous_element_4'); + this.assert(parent.down(1).identify().startsWith('anonymous_element_')); + this.assert(parent.down(2).identify().startsWith('anonymous_element_')); + this.assert(parent.down(3).identify().startsWith('anonymous_element_')); + + this.assert(parent.down(3).id !== parent.down(2).id); }, testElementClassNameMethod: function() {