diff options
author | Dan Finlay <542863+danfinlay@users.noreply.github.com> | 2019-04-25 03:25:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-25 03:25:39 +0800 |
commit | 87d5be9081fd3ab3bfb4ae67d5cab4b8a8304a8a (patch) | |
tree | 2230335f440e36c23f47e0794e94cf6b0b312024 /ui/app/pages/send/send-content/send-from-row/tests/send-from-row-component.test.js | |
parent | 8c98e89e617b594d4f0ee54a8437e30201688090 (diff) | |
parent | 6a60562d6649d88f24bd849b325871bb256a0001 (diff) | |
download | tangerine-wallet-browser-87d5be9081fd3ab3bfb4ae67d5cab4b8a8304a8a.tar.gz tangerine-wallet-browser-87d5be9081fd3ab3bfb4ae67d5cab4b8a8304a8a.tar.zst tangerine-wallet-browser-87d5be9081fd3ab3bfb4ae67d5cab4b8a8304a8a.zip |
Merge pull request #6484 from MetaMask/develop
Update master branch with develop (v6.4.0)
Diffstat (limited to 'ui/app/pages/send/send-content/send-from-row/tests/send-from-row-component.test.js')
-rw-r--r-- | ui/app/pages/send/send-content/send-from-row/tests/send-from-row-component.test.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ui/app/pages/send/send-content/send-from-row/tests/send-from-row-component.test.js b/ui/app/pages/send/send-content/send-from-row/tests/send-from-row-component.test.js new file mode 100644 index 000000000..18811c57e --- /dev/null +++ b/ui/app/pages/send/send-content/send-from-row/tests/send-from-row-component.test.js @@ -0,0 +1,31 @@ +import React from 'react' +import assert from 'assert' +import { shallow } from 'enzyme' +import SendFromRow from '../send-from-row.component.js' +import AccountListItem from '../../../account-list-item' +import SendRowWrapper from '../../send-row-wrapper/send-row-wrapper.component' + +describe('SendFromRow Component', function () { + describe('render', () => { + const wrapper = shallow( + <SendFromRow + from={ { address: 'mockAddress' } } + />, + { context: { t: str => str + '_t' } } + ) + + it('should render a SendRowWrapper component', () => { + assert.equal(wrapper.find(SendRowWrapper).length, 1) + }) + + it('should pass the correct props to SendRowWrapper', () => { + const { label } = wrapper.find(SendRowWrapper).props() + assert.equal(label, 'from_t:') + }) + + it('should render the FromDropdown with the correct props', () => { + const { account } = wrapper.find(AccountListItem).props() + assert.deepEqual(account, { address: 'mockAddress' }) + }) + }) +}) |