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

import Method from '.';

describe('Method', () => {
  it('displays the <Method> element', () => {
    const node = shallow(<Method type="get" />);
    expect(node.hasClass('Method_get')).toBe(true);
  });

  it('displays the <Method> at 40px', () => {
    const node = shallow(<Method type="get" width={40} />);
    expect(node.find('.Method').prop('style')).toHaveProperty('width', 40);
  });
});
