git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implemented .data() to get the entire data object. Closes #4284
[jquery.git]
/
test
/
unit
/
data.js
diff --git
a/test/unit/data.js
b/test/unit/data.js
index
812ccd2
..
14483a1
100644
(file)
--- a/
test/unit/data.js
+++ b/
test/unit/data.js
@@
-15,6
+15,14
@@
test("jQuery.data", function() {
});
\r
\r
test(".data()", function() {
\r
});
\r
\r
test(".data()", function() {
\r
+ expect(1);
\r
+
\r
+ var div = jQuery("#foo");
\r
+ div.data("test", "success");
\r
+ isObj( div.data(), {test: "success"}, "data() get the entire data object" )
\r
+})
\r
+
\r
+test(".data(String) and .data(String, Object)", function() {
\r
expect(22);
\r
var div = jQuery("#foo");
\r
equals( div.data("test"), undefined, "Check for no data exists" );
\r
expect(22);
\r
var div = jQuery("#foo");
\r
equals( div.data("test"), undefined, "Check for no data exists" );
\r