X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fmanipulation.js;h=1e69340b81bdb971e6bc653abb3dc9940170e82d;hb=532bec4c694532acbe2e14ad3b6ff72a4da90be0;hp=41ce8bb16c5cc3d839bd46b89ecebe9e1100a820;hpb=8660ea1ab61dd16aec1ed24ec549c6258292b96a;p=jquery.git 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);