summaryrefslogtreecommitdiff
path: root/web-ui/src/common/back_link/back_link.spec.js
blob: ee6592672a7a98007ed49de81116847f4541564d (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 BackLink from 'src/common/back_link/back_link';

describe('BackLink', () => {
  let backLink;

  beforeEach(() => {
    backLink = shallow(<BackLink text='Back to inbox' href='/' />);
  });

  it('renders link with text', () => {
    expect(backLink.find('a').text()).toEqual('Back to inbox');
  });

  it('adds link action', () => {
    expect(backLink.find('a').props().href).toEqual('/');
  });
});