1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
/* bender-tags: editor */
/* bender-ckeditor-plugins: flash */
( function() {
bender.editor = true;
bender.test( {
'test create editor with deprecated flash plugin': function() {
var spy = sinon.spy( CKEDITOR, 'error' );
bender.editorBot.create( {
name: 'editor'
}, function() {
spy.restore();
assert.areSame( 1, spy.callCount, 'Error was thrown' );
assert.isTrue( spy.calledWith( 'editor-plugin-deprecated' ), 'The error code is invalid' );
assert.isTrue( spy.calledWithExactly( 'editor-plugin-deprecated', sinon.match( {
plugin: 'flash'
} ) ), 'Appropriate error code and additional data should be used' );
} );
}
} );
} )();
|