import React from 'react';
import { shallow } from 'enzyme';

import Button from '.';

describe('Button', () => {
  it('displays a button', () => {
    const node = shallow(<Button />);
    expect(node.hasClass('Button')).toBe(true);
  });

  it('displays a circular button', () => {
    const node = shallow(<Button circular />);
    expect(node.hasClass('Button_circular')).toBe(true);
  });

  it('displays a ghost button', () => {
    const node = shallow(<Button ghost />);
    expect(node.hasClass('Button_ghost')).toBe(true);
  });

  it('displays a large button', () => {
    const node = shallow(<Button size="lg" />);
    expect(node.hasClass('Button_lg')).toBe(true);
  });

  it('displays a text button', () => {
    const node = shallow(<Button text />);
    expect(node.hasClass('Button_text')).toBe(true);
  });

  it('displays a submit button', () => {
    const node = shallow(<Button type="submit" />);
    expect(node.find('.Button').prop('type')).toBe('submit');
  });
});
