import Gallery from './Gallery.component';

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

    const json = renderJSON(
      <Gallery id="test">
        <div>Test</div>
      </Gallery>,
    );

    expect(json.type).toBe('div');
  });

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

  it('SAD: without Id', () => {
    expect(() =>
      shallow(
        <Gallery>
          <div>Test</div>
        </Gallery>,
      ),
    ).toThrow();
  });
});
