|
|
@@ -136,24 +136,6 @@ describe( 'Collection', () => {
|
|
|
} ).to.throw( CKEditorError, /^collection-add-invalid-id/ );
|
|
|
} );
|
|
|
|
|
|
- it(
|
|
|
- 'should not override item under an existing id in case of a collision ' +
|
|
|
- 'between existing items and one with an automatically generated id',
|
|
|
- () => {
|
|
|
- // Add many items to the collection
|
|
|
- // to be sure that next item id will be higher than id already stored in uid cache.
|
|
|
- for ( let i = 0; i < 100; i++ ) {
|
|
|
- collection.add( getItem( String( i ) ) );
|
|
|
- }
|
|
|
-
|
|
|
- let item = {};
|
|
|
-
|
|
|
- collection.add( item );
|
|
|
-
|
|
|
- expect( item.id ).to.be.at.least( 100 );
|
|
|
- }
|
|
|
- );
|
|
|
-
|
|
|
it(
|
|
|
'should generate an id when not defined, which is globally unique ' +
|
|
|
'so it is possible to move items between collections and avoid id collisions',
|