浏览代码

Merge pull request #182 from ckeditor/t/ckeditor5-engine/738

Other: Aligned code to the changes API in `ckeditor5-engine`. Read more ckeditor/ckeditor5-engine#738.
Szymon Kupś 7 年之前
父节点
当前提交
b3f01ef5cb
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      packages/ckeditor5-image/tests/imagecaption/imagecaptionediting.js

+ 2 - 3
packages/ckeditor5-image/tests/imagecaption/imagecaptionediting.js

@@ -465,12 +465,11 @@ describe( 'ImageCaptionEditing', () => {
 			} );
 
 			it( 'undo should work after inserting the image', () => {
-				const image = new ModelElement( 'image' );
-				image.setAttribute( 'src', '/foo.png' );
-
 				setModelData( model, '<paragraph>foo[]</paragraph>' );
 
 				model.change( writer => {
+					const image = writer.createElement( 'image', { src: '/foo.png' } );
+
 					writer.insert( image, doc.getRoot() );
 				} );