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

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2021-11-02 13:26:24 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-11-11 12:43:03 +0300
commit4aec3380d148135c4eade09f0c42ae5c51db49a4 (patch)
tree133386c36cb256756e1bf2dee6c5602d1e7e7c30 /src
parentc02e2d4b14ba179691decf6d609e28533443a136 (diff)
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 <azul@riseup.net>
Diffstat (limited to 'src')
-rw-r--r--src/tests/nodes/ImageView.spec.js4
1 files changed, 1 insertions, 3 deletions
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 = () => ({