From 0fbd106874f8ebc5e432dd3e50cad2d290fa92ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Tue, 25 Sep 2018 00:39:15 +0200 Subject: [PATCH] Test toggleBlacklist callback --- .../Element/BlockButton/BlockButton.test.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/test/components/Global/Element/BlockButton/BlockButton.test.js b/test/components/Global/Element/BlockButton/BlockButton.test.js index 3850e649..b9ca6ae1 100644 --- a/test/components/Global/Element/BlockButton/BlockButton.test.js +++ b/test/components/Global/Element/BlockButton/BlockButton.test.js @@ -1,4 +1,4 @@ -import { shallowMount } from '@vue/test-utils' +import { shallowMount, mount } from '@vue/test-utils' import BlockButton from '~/components/Global/Elements/BlockButton/BlockButton' const shallowMountBlockButton = (propsData = {}) => { @@ -37,10 +37,12 @@ describe('request pending', () => { }) }) -/* -test('calls toggleBlacklist on click', (t) => { -}) - -test('opens a confirmation dialog if foreignEntity is being followed', (t) => { +test('calls toggleBlacklist on click', (done) => { + const wrapper = mount(BlockButton, { + mocks: { $t: () => {} }, + propsData: {toggleBlacklist: () => { + done() + } } + }) + wrapper.find('button').trigger('click'); }) -*/