aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/send_/account-list-item/tests/account-list-item-container.test.js
blob: 49da920e6a80d39c320881f639aa2d8ec5e9c6a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import assert from 'assert'
import proxyquire from 'proxyquire'

let mapStateToProps

proxyquire('../account-list-item.container.js', {
  'react-redux': {
    connect: (ms, md) => {
      mapStateToProps = ms
      return () => ({})
    },
  },
  '../send.selectors.js': {
    getConversionRate: (s) => `mockConversionRate:${s}`,
    getConvertedCurrency: (s) => `mockCurrentCurrency:${s}`,
  },
})

describe('account-list-item container', () => {

  describe('mapStateToProps()', () => {

    it('should map the correct properties to props', () => {
      assert.deepEqual(mapStateToProps('mockState'), {
        conversionRate: 'mockConversionRate:mockState',
        currentCurrency: 'mockCurrentCurrency:mockState',
      })
    })

  })

})