Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-09 12:09:53 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-09 12:09:53 +0300
commit1613500bf7400f5692a55fd65235a4a10fc40a7d (patch)
tree967ae692bf524c89abdde048d8f74361642293c7 /spec/frontend/content_editor
parent97576e3dfdc15b26c0a7832608397edd69167351 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/content_editor')
-rw-r--r--spec/frontend/content_editor/services/create_content_editor_spec.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/frontend/content_editor/services/create_content_editor_spec.js b/spec/frontend/content_editor/services/create_content_editor_spec.js
index 59b2fab6d54..b614efd954a 100644
--- a/spec/frontend/content_editor/services/create_content_editor_spec.js
+++ b/spec/frontend/content_editor/services/create_content_editor_spec.js
@@ -5,10 +5,11 @@ import { createTestContentEditorExtension } from '../test_utils';
describe('content_editor/services/create_editor', () => {
let renderMarkdown;
let editor;
+ const uploadsPath = '/uploads';
beforeEach(() => {
renderMarkdown = jest.fn();
- editor = createContentEditor({ renderMarkdown });
+ editor = createContentEditor({ renderMarkdown, uploadsPath });
});
it('sets gl-outline-0! class selector to the tiptapEditor instance', () => {
@@ -48,4 +49,13 @@ describe('content_editor/services/create_editor', () => {
it('throws an error when a renderMarkdown fn is not provided', () => {
expect(() => createContentEditor()).toThrow(PROVIDE_SERIALIZER_OR_RENDERER_ERROR);
});
+
+ it('provides uploadsPath and renderMarkdown function to Image extension', () => {
+ expect(
+ editor.tiptapEditor.extensionManager.extensions.find((e) => e.name === 'image').options,
+ ).toMatchObject({
+ uploadsPath,
+ renderMarkdown,
+ });
+ });
});