From 4aec3380d148135c4eade09f0c42ae5c51db49a4 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 2 Nov 2021 11:26:24 +0100 Subject: tests: provide current directory to ImageView test as option We moved away from querying `getCurrentDirectory` and instead send it to the node as a prop. Do that in the tests to make sure `ImageViews` have `options.currentDirectory` set. Signed-off-by: Azul --- src/tests/nodes/ImageView.spec.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/tests/nodes/ImageView.spec.js b/src/tests/nodes/ImageView.spec.js index 04b5a0727..5c524c4d5 100644 --- a/src/tests/nodes/ImageView.spec.js +++ b/src/tests/nodes/ImageView.spec.js @@ -1,9 +1,6 @@ import { shallowMount } from '@vue/test-utils' import ImageView from '../../nodes/ImageView.vue' -global.FileList = { - getCurrentDirectory: function() {return '/current'}, -} global.OC = { requestToken: '123', config: {modRewriteWorking: true}, @@ -15,6 +12,7 @@ describe('Image View src attribute based on markdown', () => { const factory = attrs => { const propsData = { + options: {currentDirectory: '/current'}, node: {attrs} } const data = () => ({ -- cgit v1.2.3