Browse Source

Tests: Minor corrections.

Piotrek Koszuliński 9 years ago
parent
commit
5057d25da9
1 changed files with 5 additions and 5 deletions
  1. 5 5
      packages/ckeditor5-engine/tests/_utils-tests/model.js

+ 5 - 5
packages/ckeditor5-engine/tests/_utils-tests/model.js

@@ -25,7 +25,7 @@ describe( 'model test utils', () => {
 	describe( 'getData', () => {
 		it( 'writes elements and texts', () => {
 			root.appendChildren( [
-				new Element( 'a', null, [ 'atext' ] ),
+				new Element( 'a', null, 'atext' ),
 				new Element( 'b', null, [
 					new Element( 'c1' ),
 					'ctext',
@@ -103,7 +103,7 @@ describe( 'model test utils', () => {
 				);
 			} );
 
-			it( 'writes selection collapsed at the text boundary', () => {
+			it( 'writes selection collapsed at the text left boundary', () => {
 				selection.collapse( elA, 'AFTER' );
 
 				expect( getData( document, 'main', options ) ).to.equal(
@@ -111,11 +111,11 @@ describe( 'model test utils', () => {
 				);
 			} );
 
-			it( 'writes selection collapsed at the text boundary', () => {
-				selection.collapse( elA, 'AFTER' );
+			it( 'writes selection collapsed at the text right boundary', () => {
+				selection.collapse( elB, 'BEFORE' );
 
 				expect( getData( document, 'main', options ) ).to.equal(
-					'<a></a><selection />foo<$text bold=true>bar</$text><b></b>'
+					'<a></a>foo<$text bold=true>bar</$text><selection bold=true /><b></b>'
 				);
 			} );