import GalleryElement from './GalleryElement.component';

describe('<GalleryElement>', () => {
  it('Happy: Render GalleryElement with props', () => {
    const wrapper = shallow(
      <GalleryElement>
        <div>Test</div>
      </GalleryElement>,
    );
    expect(wrapper).toHaveLength(1);

    const json = renderJSON(
      <GalleryElement>
        <div>Test</div>
      </GalleryElement>,
    );
    expect(json.type).toBe('div');
  });

  it('SAD: without children', () => {
    expect(() => shallow(<GalleryElement />)).toThrow();
  });

  it('SAD: with string children ', () => {
    expect(() => shallow(<GalleryElement>Test</GalleryElement>)).toThrow();
  });
});
