Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Fix send unit tests
Browse files Browse the repository at this point in the history
slaweet committed Jul 27, 2017

Unverified

The committer email address is not verified.
1 parent 85b9b55 commit 99e7836
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/send/send.test.js
Original file line number Diff line number Diff line change
@@ -84,20 +84,20 @@ describe('Send', () => {

wrapper.find('.amount input').simulate('change', { target: { value: '120.25' } });
wrapper.find('.recipient input').simulate('change', { target: { value: '11004588490103196952L' } });
wrapper.find('.send-button').simulate('click');
wrapper.find('.submit-button').simulate('click');
});

it('allows to send a transaction and handles error response with message', () => {
accountApiMock.expects('send').rejects({ message: 'Some server-side error' });
wrapper.find('.amount input').simulate('change', { target: { value: '120.25' } });
wrapper.find('.recipient input').simulate('change', { target: { value: '11004588490103196952L' } });
wrapper.find('.send-button').simulate('click');
wrapper.find('.submit-button').simulate('click');
});

it('allows to send a transaction and handles error response without message', () => {
accountApiMock.expects('send').rejects({ success: false });
wrapper.find('.amount input').simulate('change', { target: { value: '120.25' } });
wrapper.find('.recipient input').simulate('change', { target: { value: '11004588490103196952L' } });
wrapper.find('.send-button').simulate('click');
wrapper.find('.submit-button').simulate('click');
});
});

0 comments on commit 99e7836

Please sign in to comment.