import React from 'react';
import renderWithTheme from '../../../../testUtils/renderWithTheme';
import ValidateIcon from '../ValidateIcon';

describe('ValidateIcon', () => {
  it.each`
    status
    ${'success'}
    ${'error'}
    ${'warning'}
    ${'validating'}
  `('renders $status icon', ({ status }) => {
    const { container } = renderWithTheme(
      <ValidateIcon size="medium" status={status} />
    );

    expect(container.firstChild).toMatchSnapshot();
  });

  it.each`
    size
    ${'small'}
    ${'medium'}
    ${'large'}
  `('has $size style', ({ size }) => {
    const { container } = renderWithTheme(
      <ValidateIcon size={size} status="success" />
    );

    expect(container.firstChild).toMatchSnapshot();
  });
});
