import mountWithState from '../../../../Utils/Test/mountWithState';
import SendEmail from './SendEmail';

describe('Shared/Containers/SendEmail', () => {
    test('uses the correct shareUrl', () => {
        const state = {
            configurator: {
                configuration: {
                    shareUrl: 'http://the.configurator.url/code:MYCODE123',
                },
            },
            ui: {
                visibilityMap: {
                    sendEmail: true,
                },
            },
        };
        const { wrapper } = mountWithState(SendEmail, state);
        const expectedUrl = 'http://the.configurator.url/code:MYCODE123';
        expect(wrapper.find('SendEmail').props().shareUrl).toBe(expectedUrl);
    });
});
