restrictedediting.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. /* global document */
  6. import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
  7. import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
  8. import RestrictedEditing from './../src/restrictedediting';
  9. describe( 'RestrictedEditing', () => {
  10. let editor, element;
  11. testUtils.createSinonSandbox();
  12. beforeEach( async () => {
  13. element = document.createElement( 'div' );
  14. document.body.appendChild( element );
  15. editor = await ClassicTestEditor.create( element, { plugins: [ RestrictedEditing ] } );
  16. } );
  17. afterEach( () => {
  18. element.remove();
  19. return editor.destroy();
  20. } );
  21. it( 'should be named', () => {
  22. expect( RestrictedEditing.pluginName ).to.equal( 'RestrictedEditing' );
  23. } );
  24. it( 'should be loaded', () => {
  25. expect( editor.plugins.get( RestrictedEditing ) ).to.be.instanceOf( RestrictedEditing );
  26. } );
  27. } );