mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
test email checked filter
This commit is contained in:
parent
3c5d7f2ced
commit
d96e458356
@ -11,6 +11,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({
|
||||
lastName: 'Bloxberg',
|
||||
email: 'bibi@bloxberg.de',
|
||||
creation: [200, 400, 600],
|
||||
emailChecked: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -43,6 +44,16 @@ describe('UserSearch', () => {
|
||||
expect(wrapper.find('div.user-search').exists()).toBeTruthy()
|
||||
})
|
||||
|
||||
describe('unconfirmed emails', () => {
|
||||
beforeEach(async () => {
|
||||
await wrapper.find('button.btn-block').trigger('click')
|
||||
})
|
||||
|
||||
it('filters the users by unconfirmed emails', () => {
|
||||
expect(wrapper.vm.searchResult).toHaveLength(0)
|
||||
})
|
||||
})
|
||||
|
||||
describe('apollo returns error', () => {
|
||||
beforeEach(() => {
|
||||
apolloQueryMock.mockRejectedValue({
|
||||
|
||||
@ -58,8 +58,8 @@ export default {
|
||||
|
||||
methods: {
|
||||
unconfirmedRegisterMails() {
|
||||
this.searchResult = this.searchResult.filter((result) => {
|
||||
return !result.emailChecked
|
||||
this.searchResult = this.searchResult.filter((user) => {
|
||||
return user.emailChecked
|
||||
})
|
||||
},
|
||||
getUsers() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user