浏览代码

Added missing test.

Piotrek Koszuliński 7 年之前
父节点
当前提交
d6f676a003
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12 0
      packages/ckeditor5-table/tests/commands/inserttablecommand.js

+ 12 - 0
packages/ckeditor5-table/tests/commands/inserttablecommand.js

@@ -96,6 +96,18 @@ describe( 'InsertTableCommand', () => {
 	} );
 
 	describe( 'execute()', () => {
+		it( 'should create a single batch', () => {
+			setData( model, '<p>foo[]</p>' );
+
+			const spy = sinon.spy();
+
+			model.document.on( 'change', spy );
+
+			command.execute( { rows: 3, columns: 4 } );
+
+			sinon.assert.calledOnce( spy );
+		} );
+
 		describe( 'collapsed selection', () => {
 			it( 'should insert table in empty root', () => {
 				setData( model, '[]' );