aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/data.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2010-10-17 10:56:01 -0400
committerJohn Resig <jeresig@gmail.com>2010-10-17 10:56:01 -0400
commite1b940d74824282fd3466d39a8ab574da4ef6fc5 (patch)
treede58ca61e51dfc8383c1e0841d3543846a3581f4 /test/unit/data.js
parent25828768d7bc2d76438244e69d6eeb69c36227e6 (diff)
downloadjquery-e1b940d74824282fd3466d39a8ab574da4ef6fc5.tar.gz
jquery-e1b940d74824282fd3466d39a8ab574da4ef6fc5.zip
We removed deleteExpando after 1.4.2, for some reason. This caused problems with removeData() (no arguments). Fixes #7209.
Diffstat (limited to 'test/unit/data.js')
-rw-r--r--test/unit/data.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/unit/data.js b/test/unit/data.js
index 81f5e61fa..b0c9f3f82 100644
--- a/test/unit/data.js
+++ b/test/unit/data.js
@@ -284,11 +284,16 @@ test(".data(Object)", function() {
});
test("jQuery.removeData", function() {
- expect(5);
+ expect(7);
var div = jQuery("#foo")[0];
jQuery.data(div, "test", "testing");
jQuery.removeData(div, "test");
equals( jQuery.data(div, "test"), undefined, "Check removal of data" );
+
+ jQuery.data(div, "test2", "testing");
+ jQuery.removeData( div );
+ ok( !jQuery.data(div, "test2"), "Make sure that the data property no longer exists." );
+ ok( !div[ jQuery.expando ], "Make sure the expando no longer exists, as well." );
var obj = {};
jQuery.data(obj, "test", "testing");