diff options
author | Vimal <vtiwari@coinswitch.co> | 2018-11-12 20:20:37 +0800 |
---|---|---|
committer | Vimal <vtiwari@coinswitch.co> | 2018-11-12 20:20:37 +0800 |
commit | 6bb92a8672edf23465fb109c8966d2e56500ea86 (patch) | |
tree | 6f5c4e348fb58fcf23b27278ffae1c1b912ad08e /ui/app/components/user-preferenced-currency-input/tests/user-preferenced-currency-input.container.test.js | |
parent | 82b11b69a5dea38a4a036096528354a5a291a447 (diff) | |
parent | da1036f2c4b20748407b7fa89b60df5e321fcab7 (diff) | |
download | tangerine-wallet-browser-6bb92a8672edf23465fb109c8966d2e56500ea86.tar.gz tangerine-wallet-browser-6bb92a8672edf23465fb109c8966d2e56500ea86.tar.zst tangerine-wallet-browser-6bb92a8672edf23465fb109c8966d2e56500ea86.zip |
merging upstream branch
Diffstat (limited to 'ui/app/components/user-preferenced-currency-input/tests/user-preferenced-currency-input.container.test.js')
-rw-r--r-- | ui/app/components/user-preferenced-currency-input/tests/user-preferenced-currency-input.container.test.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ui/app/components/user-preferenced-currency-input/tests/user-preferenced-currency-input.container.test.js b/ui/app/components/user-preferenced-currency-input/tests/user-preferenced-currency-input.container.test.js new file mode 100644 index 000000000..959726443 --- /dev/null +++ b/ui/app/components/user-preferenced-currency-input/tests/user-preferenced-currency-input.container.test.js @@ -0,0 +1,31 @@ +import assert from 'assert' +import proxyquire from 'proxyquire' + +let mapStateToProps + +proxyquire('../user-preferenced-currency-input.container.js', { + 'react-redux': { + connect: ms => { + mapStateToProps = ms + return () => ({}) + }, + }, +}) + +describe('UserPreferencedCurrencyInput container', () => { + describe('mapStateToProps()', () => { + it('should return the correct props', () => { + const mockState = { + metamask: { + preferences: { + useNativeCurrencyAsPrimaryCurrency: true, + }, + }, + } + + assert.deepEqual(mapStateToProps(mockState), { + useNativeCurrencyAsPrimaryCurrency: true, + }) + }) + }) +}) |