diff --git a/backend/src/resolvers/users.spec.js b/backend/src/resolvers/users.spec.js index 48e4741d7..a20bf1dac 100644 --- a/backend/src/resolvers/users.spec.js +++ b/backend/src/resolvers/users.spec.js @@ -68,7 +68,8 @@ describe('users', () => { it('with no name', async () => { const variables = { - id: 'u47' + id: 'u47', + name: null } const expected = 'Username must be at least 3 characters long!' await expect(client.request(mutation, variables)) diff --git a/webapp/components/Upload/index.vue b/webapp/components/Upload/index.vue index ed1e96c32..9bda28f34 100644 --- a/webapp/components/Upload/index.vue +++ b/webapp/components/Upload/index.vue @@ -41,10 +41,6 @@ export default { } } }, - mounted() { - // Everything is mounted and you can access the dropzone instance - const instance = this.$refs.el.dropzone - }, methods: { template() { return `
diff --git a/webapp/components/Upload/spec.js b/webapp/components/Upload/spec.js index f69211bea..71c35d962 100644 --- a/webapp/components/Upload/spec.js +++ b/webapp/components/Upload/spec.js @@ -1,11 +1,24 @@ -import { shallowMount } from '@vue/test-utils' +import { shallowMount, createLocalVue } from '@vue/test-utils' import Upload from '.' +import Vuex from 'vuex' +import Styleguide from '@human-connection/styleguide' + +const localVue = createLocalVue() +localVue.use(Vuex) +localVue.use(Styleguide) describe('Upload', () => { let wrapper + let propsData + + propsData = { + user: { + avatar: '/api/avatar.jpg' + } + } beforeEach(() => { - wrapper = shallowMount(Upload, {}) + wrapper = shallowMount(Upload, { localVue, propsData }) }) it('renders', () => {