blob: 945afffea51afe2d301c04827a76536496b066ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import { shallow } from 'enzyme';
import expect from 'expect';
import React from 'react';
import LinkButton from 'src/common/link_button/link_button';
describe('LinkButton', () => {
let linkButton;
beforeEach(() => {
linkButton = shallow(<LinkButton buttonText='Go To Link' href='/some-link' />);
});
it('renders link button with given button text', () => {
expect(linkButton.find('FlatButton').props().label).toEqual('Go To Link');
});
it('renders link button with given href', () => {
expect(linkButton.find('FlatButton').props().href).toEqual('/some-link');
});
});
|