diff options
Diffstat (limited to 'spec/javascript')
-rw-r--r-- | spec/javascript/components/display_name.test.jsx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/javascript/components/display_name.test.jsx b/spec/javascript/components/display_name.test.jsx new file mode 100644 index 000000000..c25eb8530 --- /dev/null +++ b/spec/javascript/components/display_name.test.jsx @@ -0,0 +1,19 @@ +import { expect } from 'chai'; +import { render } from 'enzyme'; +import Immutable from 'immutable'; + +import DisplayName from '../../../app/assets/javascripts/components/components/display_name' + +describe('<DisplayName />', () => { + const account = Immutable.fromJS({ + username: 'bar', + acct: 'bar@baz', + display_name: 'Foo' + }); + + const wrapper = render(<DisplayName account={account} />); + + it('renders display name', () => { + expect(wrapper.text()).to.match(/Foo @bar@baz/); + }); +}); |