This commit is contained in:
Moriz Wahl 2021-07-19 12:09:27 +02:00
parent 48d2d4b527
commit 72073a40ff
2 changed files with 6 additions and 2 deletions

View File

@ -112,7 +112,7 @@ describe('AccountOverview', () => {
describe('transaction is confirmed and server response is error', () => {
beforeEach(async () => {
jest.clearAllMocks()
sendMock.mockReturnValue({ success: false })
sendMock.mockReturnValue({ success: false, result: { message: 'receiver not found' } })
await wrapper
.findComponent({ name: 'TransactionConfirmation' })
.vm.$emit('send-transaction')
@ -121,6 +121,10 @@ describe('AccountOverview', () => {
it('shows the error page', () => {
expect(wrapper.find('div.card-body').text()).toContain('form.send_transaction_error')
})
it('shows recipient not found', () => {
expect(wrapper.text()).toContain('transaction.receiverNotFound')
})
})
})
})

View File

@ -75,7 +75,7 @@ export default {
timestamp: Date.now(),
transactionData: { ...EMPTY_TRANSACTION_DATA },
error: false,
errorResult: false,
errorResult: '',
currentTransactionStep: 0,
loading: false,
}