import React from 'react';
import renderer from 'react-test-renderer';
import SortableViews from './index';

describe('SortableViews', () => {
  test('it renders correctly', () => {
    const component = renderer.create(
      <SortableViews
        views={[
          { id: '1', label: 'One', isDefault: true },
          { id: '2', label: 'Two', isDefault: false },
          { id: '3', label: 'Three', isDefault: false },
        ]}
        onChange={() => {}}
      />,
    );
    const tree = component.toJSON();
    expect(tree).toMatchSnapshot();
  });
});
