aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/manipulation.js
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2010-02-01 21:53:31 -0500
committerjeresig <jeresig@gmail.com>2010-02-01 21:53:31 -0500
commit532bec4c694532acbe2e14ad3b6ff72a4da90be0 (patch)
tree0405df445d7e7e9211e3f535a4c9f2d1841957f5 /test/unit/manipulation.js
parent8660ea1ab61dd16aec1ed24ec549c6258292b96a (diff)
downloadjquery-532bec4c694532acbe2e14ad3b6ff72a4da90be0.tar.gz
jquery-532bec4c694532acbe2e14ad3b6ff72a4da90be0.zip
Adding in some more replaceWith tests for #5917.
Diffstat (limited to 'test/unit/manipulation.js')
-rw-r--r--test/unit/manipulation.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js
index 41ce8bb16..1e69340b8 100644
--- a/test/unit/manipulation.js
+++ b/test/unit/manipulation.js
@@ -736,7 +736,17 @@ test("replaceWith(Function)", function() {
});
reset();
-})
+});
+
+test("replaceWith(string) for more than one element", function(){
+ expect(3);
+
+ equals(jQuery('#foo p').length, 3, 'ensuring that test data has not changed');
+
+ jQuery('#foo p').replaceWith('<span>bar</span>');
+ equals(jQuery('#foo span').length, 3, 'verify that all the three original element have been replaced');
+ equals(jQuery('#foo p').length, 0, 'verify that all the three original element have been replaced');
+});
test("replaceAll(String|Element|Array&lt;Element&gt;|jQuery)", function() {
expect(10);