File: error.js

package info (click to toggle)
ckeditor 4.19.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 290,372 kB
  • sloc: javascript: 242,409; sh: 202; makefile: 64; python: 37; php: 15; xml: 5
file content (25 lines) | stat: -rw-r--r-- 681 bytes parent folder | download | duplicates (2)
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' );
			} );
		}
	} );
} )();