import { Thumbnail } from './thumbnail';
import React from 'react';
import ReactTestRenderer from 'react-test-renderer';

describe('User icon tests', () => {

  it('renders user icon correctly', () => {
    const tree = ReactTestRenderer
      .create(<Thumbnail size='size-small' src={'https://picsum.photos/64/64/?image=1011'} />)
      .toJSON();
    expect(tree).toMatchSnapshot();
  });

  it('renders user icon correctly when size is not specified', () => {
    const tree = ReactTestRenderer
      .create(<Thumbnail src={'https://picsum.photos/64/64/?image=1011'} />)
      .toJSON();
    expect(tree).toMatchSnapshot();
  });

});
