import { render } from '@testing-library/react';
import DoubleOptInMessage from '../DoubleOptInMessage';
import DoubleOptInSuccessPage from './page';

vi.mock('../DoubleOptInMessage', () => ({
    default: vi.fn(() => <div>mocked</div>),
}));

describe('<DoubleOptInSuccessPage>', () => {
    it('should render DoubleOptInMessage with successMessage key', () => {
        render(<DoubleOptInSuccessPage />);

        expect(DoubleOptInMessage).toHaveBeenCalledWith(
            { messageKey: 'successMessage' },
            undefined
        );
    });
});
