Browse Source

Added tests for ImageCaptioning plugin.

Szymon Kupś 9 years ago
parent
commit
9e97d066dc
1 changed files with 34 additions and 0 deletions
  1. 34 0
      packages/ckeditor5-image/tests/imagecaptioning/imagecaptioning.js

+ 34 - 0
packages/ckeditor5-image/tests/imagecaptioning/imagecaptioning.js

@@ -0,0 +1,34 @@
+/**
+ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+/* global window */
+
+import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
+import ImageCaptioning from '../../src/imagecaptioning/imagecaptioning';
+import ImageCaptioningEngine from '../../src/imagecaptioning/imagecaptioningengine';
+
+describe( 'ImageCaptioning', () => {
+	let editor;
+
+	beforeEach( () => {
+		const editorElement = window.document.createElement( 'div' );
+		window.document.body.appendChild( editorElement );
+
+		return ClassicTestEditor.create( editorElement, {
+			plugins: [ ImageCaptioning ]
+		} )
+		.then( newEditor => {
+			editor = newEditor;
+		} );
+	} );
+
+	it( 'should be loaded', () => {
+		expect( editor.plugins.get( ImageCaptioning ) ).to.instanceOf( ImageCaptioning );
+	} );
+
+	it( 'should load ImageCaptioningEngine plugin', () => {
+		expect( editor.plugins.get( ImageCaptioningEngine ) ).to.instanceOf( ImageCaptioningEngine );
+	} );
+} );