From 5e1445d3cb83db0d6c653acdd7dc278886901ed2 Mon Sep 17 00:00:00 2001 From: Kamil Piechaczek Date: Tue, 27 Feb 2018 12:09:53 +0100 Subject: [PATCH] Aligned code to the changes in engine. --- tests/imagecaption/imagecaptionengine.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/imagecaption/imagecaptionengine.js b/tests/imagecaption/imagecaptionengine.js index c59dea0b..22f7b04a 100644 --- a/tests/imagecaption/imagecaptionengine.js +++ b/tests/imagecaption/imagecaptionengine.js @@ -465,12 +465,11 @@ describe( 'ImageCaptionEngine', () => { } ); it( 'undo should work after inserting the image', () => { - const image = new ModelElement( 'image' ); - image.setAttribute( 'src', '/foo.png' ); - setModelData( model, 'foo[]' ); model.change( writer => { + const image = writer.createElement( 'image', { src: '/foo.png' } ); + writer.insert( image, doc.getRoot() ); } );