diff --git a/frontend/src/views/Pages/UserProfileTransactionList.spec.js b/frontend/src/views/Pages/UserProfileTransactionList.spec.js index b075b2381..0761c5032 100644 --- a/frontend/src/views/Pages/UserProfileTransactionList.spec.js +++ b/frontend/src/views/Pages/UserProfileTransactionList.spec.js @@ -23,11 +23,19 @@ describe('UserProfileTransactionList', () => { expect(wrapper.findComponent({ name: 'GddTransactionList' }).exists()).toBeTruthy() }) - it('emist update-transactions when update-transactions is called', async () => { - wrapper.findComponent({ name: 'GddTransactionList' }).vm.$emit('update-transactions') + it('emits update-transactions after creation', () => { expect(wrapper.emitted('update-transactions')).toEqual( expect.arrayContaining([expect.arrayContaining([{ firstPage: 1, items: 25 }])]), ) }) + + it('emist update-transactions when update-transactions is called', () => { + wrapper + .findComponent({ name: 'GddTransactionList' }) + .vm.$emit('update-transactions', { firstPage: 2, items: 25 }) + expect(wrapper.emitted('update-transactions')).toEqual( + expect.arrayContaining([expect.arrayContaining([{ firstPage: 2, items: 25 }])]), + ) + }) }) })