From 532bec4c694532acbe2e14ad3b6ff72a4da90be0 Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Mon, 1 Feb 2010 21:53:31 -0500 Subject: [PATCH] Adding in some more replaceWith tests for #5917. --- test/unit/manipulation.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 41ce8bb..1e69340 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('bar'); + 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<Element>|jQuery)", function() { expect(10); -- 1.7.10.4