Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Tests: Should not log a warning which is expected to be logged.
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Nov 16, 2016
1 parent bf9fc9f commit bf87840
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/model/liveselection.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import count from 'ckeditor5/utils/count.js';
import testUtils from 'tests/core/_utils/utils.js';
import { wrapInDelta } from 'tests/engine/model/_utils/utils.js';

import log from 'ckeditor5/utils/log.js';

testUtils.createSinonSandbox();

describe( 'LiveSelection', () => {
Expand Down Expand Up @@ -136,13 +138,16 @@ describe( 'LiveSelection', () => {
} );

it( 'should not add a range that is in graveyard', () => {
const spy = testUtils.sinon.stub( log, 'warn' );

selection.addRange( Range.createIn( doc.graveyard ) );

expect( selection._ranges.length ).to.equal( 0 );
expect( spy.calledOnce ).to.be.true;
} );

it( 'should refresh attributes', () => {
const spy = sinon.spy( selection, '_updateAttributes' );
const spy = testUtils.sinon.spy( selection, '_updateAttributes' );

selection.addRange( range );

Expand Down

0 comments on commit bf87840

Please sign in to comment.