git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make sure that jQuery.data( elem ) always returns a data object, fixes #5971. Improve...
[jquery.git]
/
test
/
unit
/
data.js
diff --git
a/test/unit/data.js
b/test/unit/data.js
index
fd03c54
..
79b23c6
100644
(file)
--- a/
test/unit/data.js
+++ b/
test/unit/data.js
@@
-1,20
+1,19
@@
module("data");
test("expando", function(){
module("data");
test("expando", function(){
- expect(7);
+ expect(6);
equals("expando" in jQuery, true, "jQuery is exposing the expando");
var obj = {};
jQuery.data(obj);
equals("expando" in jQuery, true, "jQuery is exposing the expando");
var obj = {};
jQuery.data(obj);
- equals( jQuery.expando in obj, false, "jQuery.data did not add an expando to the object" );
-
- jQuery.data(obj, true);
- equals( jQuery.expando in obj, false, "jQuery.data did not add an expando to the object" );
-
+ equals( jQuery.expando in obj, true, "jQuery.data adds an expando to the object" );
+
+ obj = {};
jQuery.data(obj, 'test');
equals( jQuery.expando in obj, false, "jQuery.data did not add an expando to the object" );
jQuery.data(obj, 'test');
equals( jQuery.expando in obj, false, "jQuery.data did not add an expando to the object" );
-
+
+ obj = {};
jQuery.data(obj, "foo", "bar");
equals( jQuery.expando in obj, true, "jQuery.data added an expando to the object" );
jQuery.data(obj, "foo", "bar");
equals( jQuery.expando in obj, true, "jQuery.data added an expando to the object" );