aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2009-01-08 21:41:58 +0000
committerJohn Resig <jeresig@gmail.com>2009-01-08 21:41:58 +0000
commitc6f189ac73939c813bf3a2b848c492c8ba259807 (patch)
tree0dbe84b27ecdbb09014a10e9589ba44990286ab2 /test
parent49d0d5b7a3628947a14028d14ed042746cc6c3e4 (diff)
downloadjquery-c6f189ac73939c813bf3a2b848c492c8ba259807.tar.gz
jquery-c6f189ac73939c813bf3a2b848c492c8ba259807.zip
Selector state wasn't being passed along on a cloned jQuery object.
Diffstat (limited to 'test')
-rw-r--r--test/unit/core.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/unit/core.js b/test/unit/core.js
index ee5f805ec..98a161fa8 100644
--- a/test/unit/core.js
+++ b/test/unit/core.js
@@ -53,7 +53,7 @@ test("jQuery()", function() {
});
test("selector state", function() {
- expect(26);
+ expect(28);
var test;
@@ -80,6 +80,11 @@ test("selector state", function() {
test = jQuery("#main", document.body);
equals( test.selector, "#main", "#main Selector" );
equals( test.context, document.body, "#main Context" );
+
+ // Test cloning
+ test = jQuery(test);
+ equals( test.selector, "#main", "#main Selector" );
+ equals( test.context, document.body, "#main Context" );
test = jQuery(document.body).find("#main");
equals( test.selector, "#main", "#main find Selector" );