import CardContent from './CardContent.component';

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

    const json = renderJSON(<CardContent title="title">Test</CardContent>);
    expect(json.type).toBe('div');
  });

  it('Happy: Render CardContent with node children', () => {
    const wrapper = shallow(
      <CardContent title="title">
        <div>Test</div>
      </CardContent>,
    );
    expect(wrapper).toHaveLength(1);

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