aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorOleg Gaidarenko <markelog@gmail.com>2014-02-18 21:46:00 +0400
committerOleg Gaidarenko <markelog@gmail.com>2014-04-15 17:45:59 +0400
commitebbbe965b8408e145ebe4b3ffd183b169c29b75b (patch)
tree5ec4b38e7d1e6e7cc2928421c65b3096a7bfb6f7 /test
parent9d79b99874a5f52f0b83ca11dd45a7302adebdae (diff)
downloadjquery-ebbbe965b8408e145ebe4b3ffd183b169c29b75b.tar.gz
jquery-ebbbe965b8408e145ebe4b3ffd183b169c29b75b.zip
Tests: Correct logic of a broken assertion
Diffstat (limited to 'test')
-rw-r--r--test/unit/attributes.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js
index 7839abd85..0bfe5f073 100644
--- a/test/unit/attributes.js
+++ b/test/unit/attributes.js
@@ -374,8 +374,6 @@ test( "attr(String, Object)", function() {
strictEqual( $elem.attr("nonexisting"), undefined, "attr(name, value) works correctly on comment and text nodes (bug #7500)." );
});
- // Register the property name to avoid generating a new global when testing window
- Globals.register("nonexisting");
jQuery.each( [ window, document, obj, "#firstp" ], function( i, elem ) {
var oldVal = elem.nonexisting,
$elem = jQuery( elem );
@@ -384,6 +382,9 @@ test( "attr(String, Object)", function() {
elem.nonexisting = oldVal;
});
+ // Register the property on the window for the previous assertion so it will be clean up
+ Globals.register( "nonexisting" );
+
table = jQuery("#table").append("<tr><td>cell</td></tr><tr><td>cell</td><td>cell</td></tr><tr><td>cell</td><td>cell</td></tr>");
td = table.find("td").eq(0);
td.attr( "rowspan", "2" );