Skip to content

Commit 0fbd106

Browse files
committed
Test toggleBlacklist callback
1 parent 50af119 commit 0fbd106

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

test/components/Global/Element/BlockButton/BlockButton.test.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { shallowMount } from '@vue/test-utils'
1+
import { shallowMount, mount } from '@vue/test-utils'
22
import BlockButton from '~/components/Global/Elements/BlockButton/BlockButton'
33

44
const shallowMountBlockButton = (propsData = {}) => {
@@ -37,10 +37,12 @@ describe('request pending', () => {
3737
})
3838
})
3939

40-
/*
41-
test('calls toggleBlacklist on click', (t) => {
42-
})
43-
44-
test('opens a confirmation dialog if foreignEntity is being followed', (t) => {
40+
test('calls toggleBlacklist on click', (done) => {
41+
const wrapper = mount(BlockButton, {
42+
mocks: { $t: () => {} },
43+
propsData: {toggleBlacklist: () => {
44+
done()
45+
} }
46+
})
47+
wrapper.find('button').trigger('click');
4548
})
46-
*/

0 commit comments

Comments
 (0)