// @flow
import React from 'react';
import { shallow } from 'enzyme';
import ListItemRight from './ListItemRight';

describe('ListItemRight component', () => {
  let wrapper;

  beforeEach(() => {
    wrapper = shallow(<ListItemRight />);
  });

  it('has a container', () => {
    expect(wrapper.find('View')).toExist();
  });

  it('can have an icon', () => {
    const iconName = 'email';
    wrapper.setProps({ icon: iconName });
    const icon = wrapper.find('Icon');
    expect(icon).toExist();
    expect(icon).toHaveProp('name', iconName);
  });
});
