Przeglądaj źródła

Increased code coverage.

Oskar Wróbel 9 lat temu
rodzic
commit
6480b8d014

+ 6 - 0
packages/ckeditor5-engine/tests/dev-utils/model.js

@@ -151,6 +151,12 @@ describe( 'model test utils', () => {
 			} ).to.throw( TypeError, 'Document needs to be an instance of module:engine/model/document~Document.' );
 			} ).to.throw( TypeError, 'Document needs to be an instance of module:engine/model/document~Document.' );
 		} );
 		} );
 
 
+		it( 'should set attributes to the selection', () => {
+			setData( document, '<b>[foo bar]</b>', { selectionAttributes: { foo: 'bar' } } );
+
+			expect( document.selection.getAttribute( 'foo' ) ).to.equal( 'bar' );
+		} );
+
 		function test( data, expected ) {
 		function test( data, expected ) {
 			expected = expected || data;
 			expected = expected || data;