mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
30a2be85ee
* Prevent users from changing the From field in the send screen * Fix integration tests
27 lines
582 B
JavaScript
27 lines
582 B
JavaScript
import assert from 'assert'
|
|
import proxyquire from 'proxyquire'
|
|
|
|
let mapStateToProps
|
|
|
|
proxyquire('../send-from-row.container.js', {
|
|
'react-redux': {
|
|
connect: ms => {
|
|
mapStateToProps = ms
|
|
return () => ({})
|
|
},
|
|
},
|
|
'../../send.selectors.js': {
|
|
getSendFromObject: (s) => `mockFrom:${s}`,
|
|
},
|
|
})
|
|
|
|
describe('send-from-row container', () => {
|
|
describe('mapStateToProps()', () => {
|
|
it('should map the correct properties to props', () => {
|
|
assert.deepEqual(mapStateToProps('mockState'), {
|
|
from: 'mockFrom:mockState',
|
|
})
|
|
})
|
|
})
|
|
})
|