You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
727 B
25 lines
727 B
4 years ago
|
import React from 'react';
|
||
|
import { render } from 'enzyme';
|
||
4 years ago
|
import SelectedAccount from './selected-account.component';
|
||
6 years ago
|
|
||
4 years ago
|
describe('SelectedAccount Component', () => {
|
||
|
it('should render checksummed address', () => {
|
||
4 years ago
|
const wrapper = render(
|
||
5 years ago
|
<SelectedAccount
|
||
4 years ago
|
selectedIdentity={{
|
||
|
name: 'testName',
|
||
|
address: '0x1b82543566f41a7db9a9a75fc933c340ffb55c9d',
|
||
|
}}
|
||
|
/>,
|
||
|
{ context: { t: () => undefined } },
|
||
4 years ago
|
);
|
||
6 years ago
|
// Checksummed version of address is displayed
|
||
4 years ago
|
expect(wrapper.find('.selected-account__address').text()).toStrictEqual(
|
||
4 years ago
|
'0x1B82...5C9D',
|
||
4 years ago
|
);
|
||
4 years ago
|
expect(wrapper.find('.selected-account__name').text()).toStrictEqual(
|
||
4 years ago
|
'testName',
|
||
4 years ago
|
);
|
||
|
});
|
||
|
});
|