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

import Statistic from '..';

describe('Statistic', () => {
  it('renders correct title and value', () => {
    const { getByText } = renderWithTheme(
      <Statistic
        value="123"
        title="Active Users"
        suffix="/ 200"
        prefix="Internal"
      />
    );
    // expect to render title
    expect(getByText('Active Users')).toBeInTheDocument();

    // expect to render value
    expect(getByText('123')).toBeInTheDocument();

    // expect to render prefix
    expect(getByText('Internal')).toBeInTheDocument();

    // expect to render suffix
    expect(getByText('/ 200')).toBeInTheDocument();
  });
});
