aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/selected-account/tests/selected-account-component.test.js
blob: 78a94d1c89aa5ba084c8747abe0ec579da604bfa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import React from 'react'
import assert from 'assert'
import { render } from 'enzyme'
import SelectedAccount from '../selected-account.component'

describe('SelectedAccount Component', () => {
  it('should render checksummed address', () => {
    const wrapper = render(<SelectedAccount
      selectedAddress="0x1b82543566f41a7db9a9a75fc933c340ffb55c9d"
      selectedIdentity={{ name: 'testName' }}
    />, { context: { t: () => {}}})
    // Checksummed version of address is displayed
    assert.equal(wrapper.find('.selected-account__address').text(), '0x1B82...5C9D')
    assert.equal(wrapper.find('.selected-account__name').text(), 'testName')
  })
})