Sfoglia il codice sorgente

Tests: Secured HeadingCommand execution test.

Aleksander Nowodzinski 8 anni fa
parent
commit
c728efab5a
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 5 1
      packages/ckeditor5-heading/tests/headingcommand.js

+ 5 - 1
packages/ckeditor5-heading/tests/headingcommand.js

@@ -160,11 +160,15 @@ describe( 'HeadingCommand', () => {
 
 			it( 'does nothing when executed with already applied option', () => {
 				const command = commands.heading1;
+				const batch = document.batch();
+				const spy = sinon.spy( batch, 'rename' );
 
 				setData( document, '<heading1>foo[]bar</heading1>' );
-				command.execute();
+
+				command.execute( { batch } );
 
 				expect( getData( document ) ).to.equal( '<heading1>foo[]bar</heading1>' );
+				sinon.assert.notCalled( spy );
 			} );
 
 			it( 'converts topmost blocks', () => {