diff options
author | Esteban MiƱo <efmino@uc.cl> | 2019-01-24 02:09:56 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-01-24 02:09:56 +0800 |
commit | 2d7c9b3dacc08c3d308100894b14d8c9f971e775 (patch) | |
tree | ddb6de9b5d8e42a5a2bcaf7cde3bdcd62f4a666a /ui/app/components/send/send-content/send-to-row/tests/send-to-row-container.test.js | |
parent | fba17d77de9e60de0e02e90dc6dbcbbf7454158a (diff) | |
download | tangerine-wallet-browser-2d7c9b3dacc08c3d308100894b14d8c9f971e775.tar.gz tangerine-wallet-browser-2d7c9b3dacc08c3d308100894b14d8c9f971e775.tar.zst tangerine-wallet-browser-2d7c9b3dacc08c3d308100894b14d8c9f971e775.zip |
Prevent send to token warning (#6058)
Diffstat (limited to 'ui/app/components/send/send-content/send-to-row/tests/send-to-row-container.test.js')
-rw-r--r-- | ui/app/components/send/send-content/send-to-row/tests/send-to-row-container.test.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ui/app/components/send/send-content/send-to-row/tests/send-to-row-container.test.js b/ui/app/components/send/send-content/send-to-row/tests/send-to-row-container.test.js index 95efdd7cc..aa09f01a9 100644 --- a/ui/app/components/send/send-content/send-to-row/tests/send-to-row-container.test.js +++ b/ui/app/components/send/send-content/send-to-row/tests/send-to-row-container.test.js @@ -12,6 +12,7 @@ const duckActionSpies = { closeToDropdown: sinon.spy(), openToDropdown: sinon.spy(), updateSendErrors: sinon.spy(), + updateSendWarnings: sinon.spy(), } proxyquire('../send-to-row.container.js', { @@ -32,6 +33,7 @@ proxyquire('../send-to-row.container.js', { './send-to-row.selectors.js': { getToDropdownOpen: (s) => `mockToDropdownOpen:${s}`, sendToIsInError: (s) => `mockInError:${s}`, + sendToIsInWarning: (s) => `mockInWarning:${s}`, getTokens: (s) => `mockTokens:${s}`, }, '../../../../actions': actionSpies, @@ -46,6 +48,7 @@ describe('send-to-row container', () => { assert.deepEqual(mapStateToProps('mockState'), { hasHexData: true, inError: 'mockInError:mockState', + inWarning: 'mockInWarning:mockState', network: 'mockNetwork:mockState', selectedToken: 'mockSelectedToken:mockState', to: 'mockTo:mockState', @@ -114,6 +117,18 @@ describe('send-to-row container', () => { }) }) + describe('updateSendToWarning()', () => { + it('should dispatch an action', () => { + mapDispatchToPropsObject.updateSendToWarning('mockToWarningObject') + assert(dispatchSpy.calledOnce) + assert(duckActionSpies.updateSendWarnings.calledOnce) + assert.equal( + duckActionSpies.updateSendWarnings.getCall(0).args[0], + 'mockToWarningObject' + ) + }) + }) + }) }) |