2020-03-27 13:59:38 -07:00
|
|
|
import React from 'react';
|
|
|
|
import { fromJS } from 'immutable';
|
|
|
|
import DisplayName from '../display_name';
|
2020-09-11 10:38:42 -07:00
|
|
|
import { createComponent } from 'soapbox/test_helpers';
|
2020-03-27 13:59:38 -07:00
|
|
|
|
|
|
|
describe('<DisplayName />', () => {
|
|
|
|
it('renders display name + account name', () => {
|
|
|
|
const account = fromJS({
|
|
|
|
username: 'bar',
|
|
|
|
acct: 'bar@baz',
|
|
|
|
display_name_html: '<p>Foo</p>',
|
|
|
|
});
|
2020-09-11 10:38:42 -07:00
|
|
|
const component = createComponent(<DisplayName account={account} />);
|
2020-03-27 13:59:38 -07:00
|
|
|
const tree = component.toJSON();
|
|
|
|
|
|
|
|
expect(tree).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
});
|