diff options
author | Azul <azul@riseup.net> | 2021-11-02 13:26:24 +0300 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2021-11-11 12:43:03 +0300 |
commit | 4aec3380d148135c4eade09f0c42ae5c51db49a4 (patch) | |
tree | 133386c36cb256756e1bf2dee6c5602d1e7e7c30 /src | |
parent | c02e2d4b14ba179691decf6d609e28533443a136 (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.js | 4 |
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 = () => ({ |