浏览代码

Fixed LinkBalloonPanel test.

Oskar Wrobel 9 年之前
父节点
当前提交
c2f2fa378b
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      packages/ckeditor5-link/tests/ui/linkballoonpanel.js

+ 5 - 3
packages/ckeditor5-link/tests/ui/linkballoonpanel.js

@@ -109,12 +109,14 @@ describe( 'LinkBalloonPanel', () => {
 					expect( linkBalloonPanel.form.collections.get( 'actions' ).get( 1 ) ).to.deep.equal( linkBalloonPanel.cancelButton );
 				} );
 
-				it( 'should hide LinkBalloonPanel on cancelButton.model#execute event', () => {
-					const hideSpy = sinon.spy( linkBalloonPanel.view, 'hide' );
+				it( 'should fire model#executeCancel event on cancelButton.model#execute event', () => {
+					const executeSpy = sinon.spy();
+
+					model.on( 'executeCancel', executeSpy );
 
 					linkBalloonPanel.cancelButton.model.fire( 'execute' );
 
-					expect( hideSpy.calledOnce ).to.true;
+					expect( executeSpy.calledOnce ).to.true;
 				} );
 			} );