mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix open creation tests. remove tests for removed methods
This commit is contained in:
parent
edd42f02ed
commit
0f01027f6b
@ -5,7 +5,6 @@ const localVue = global.localVue
|
|||||||
|
|
||||||
const apolloMutateMock = jest.fn().mockResolvedValue({})
|
const apolloMutateMock = jest.fn().mockResolvedValue({})
|
||||||
const apolloQueryMock = jest.fn().mockResolvedValue({})
|
const apolloQueryMock = jest.fn().mockResolvedValue({})
|
||||||
const toggleDetailsMock = jest.fn()
|
|
||||||
|
|
||||||
const propsData = {
|
const propsData = {
|
||||||
items: [
|
items: [
|
||||||
@ -132,14 +131,6 @@ describe('OpenCreationsTable', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('call updateUserData', () => {
|
|
||||||
it('user creations has updated data', async () => {
|
|
||||||
wrapper.vm.updateUserData(propsData.items[0], [444, 555, 666])
|
|
||||||
await wrapper.vm.$nextTick()
|
|
||||||
expect(wrapper.vm.items[0].creation).toEqual([444, 555, 666])
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('call updateState', () => {
|
describe('call updateState', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
wrapper.vm.updateState(4)
|
wrapper.vm.updateState(4)
|
||||||
@ -149,40 +140,5 @@ describe('OpenCreationsTable', () => {
|
|||||||
expect(wrapper.vm.$root.$emit('update-state', 4)).toBeTruthy()
|
expect(wrapper.vm.$root.$emit('update-state', 4)).toBeTruthy()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('call updateCreationData', () => {
|
|
||||||
const date = new Date()
|
|
||||||
beforeEach(() => {
|
|
||||||
wrapper.vm.updateCreationData({
|
|
||||||
amount: Number(80.0),
|
|
||||||
date: date,
|
|
||||||
memo: 'Test memo',
|
|
||||||
row: {
|
|
||||||
item: {},
|
|
||||||
detailsShowing: false,
|
|
||||||
toggleDetails: toggleDetailsMock,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
it('emits update-state', () => {
|
|
||||||
expect(
|
|
||||||
wrapper.vm.$emit('update-contributions', {
|
|
||||||
amount: Number(80.0),
|
|
||||||
date: date,
|
|
||||||
memo: 'Test memo',
|
|
||||||
row: {
|
|
||||||
item: {},
|
|
||||||
detailsShowing: false,
|
|
||||||
toggleDetails: toggleDetailsMock,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
).toBeTruthy()
|
|
||||||
})
|
|
||||||
|
|
||||||
it('calls toggleDetails', () => {
|
|
||||||
expect(toggleDetailsMock).toBeCalled()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user