import React from 'react';
import { render } from 'enzyme';
import LicenseNotice from './LicenseNotice';

describe('Shared/Components/LicenseNotice', () => {
    it('renders with default props', () => {
        const tree = render(<LicenseNotice />);
        expect(tree).toMatchSnapshot();
    });

    it('renders the notice', () => {
        const tree = render(<LicenseNotice displayMissingLicenseNotice={true} />);
        expect(tree).toMatchSnapshot();
    });

    it('renders the notice with top offset on small screens', () => {
        const tree = render(
            <LicenseNotice width="xs" mobileOffset={66} displayMissingLicenseNotice={true} />
        );
        expect(tree).toMatchSnapshot();
    });

    it("doesn't render notice", () => {
        const tree = render(<LicenseNotice displayMissingLicenseNotice={false} />);
        expect(tree).toMatchSnapshot();
    });
});
