瀏覽代碼

Merge pull request #43 from ckeditor/t/42

Tests: Fixed several assertions to consider the initial state of `ToggleAttributeCommand` after the refactoring. Closes #42.
Piotrek Koszuliński 8 年之前
父節點
當前提交
b87f5eaa01
共有 2 個文件被更改,包括 6 次插入6 次删除
  1. 3 3
      packages/ckeditor5-basic-styles/tests/bold.js
  2. 3 3
      packages/ckeditor5-basic-styles/tests/italic.js

+ 3 - 3
packages/ckeditor5-basic-styles/tests/bold.js

@@ -65,13 +65,13 @@ describe( 'Bold', () => {
 
 		expect( boldView.isOn ).to.be.false;
 
-		expect( boldView.isEnabled ).to.be.true;
+		expect( boldView.isEnabled ).to.be.false;
 
 		command.value = true;
 		expect( boldView.isOn ).to.be.true;
 
-		command.isEnabled = false;
-		expect( boldView.isEnabled ).to.be.false;
+		command.isEnabled = true;
+		expect( boldView.isEnabled ).to.be.true;
 	} );
 
 	it( 'should set keystroke in the model', () => {

+ 3 - 3
packages/ckeditor5-basic-styles/tests/italic.js

@@ -65,13 +65,13 @@ describe( 'Italic', () => {
 
 		expect( italicView.isOn ).to.be.false;
 
-		expect( italicView.isEnabled ).to.be.true;
+		expect( italicView.isEnabled ).to.be.false;
 
 		command.value = true;
 		expect( italicView.isOn ).to.be.true;
 
-		command.isEnabled = false;
-		expect( italicView.isEnabled ).to.be.false;
+		command.isEnabled = true;
+		expect( italicView.isEnabled ).to.be.true;
 	} );
 
 	it( 'should set keystroke in the model', () => {