from aws_lambda_powertools.utilities.typing.lambda_context import LambdaContext

import events.send_welcome_email as app


def test_send_welcome_email(lambda_context: LambdaContext):
    assert app.lambda_handler(
        {
            'detail': {
                'new_image': {
                    'id': '123',
                    'sk': 'EMAIL_VERIFICATION#123',
                    'name': 'Sérgio R Siqueira',
                    'email': 'osergiosiqueira@gmail.com',
                },
            },
        },  # type: ignore
        lambda_context,
    )

    assert app.lambda_handler(
        {
            'detail': {
                'new_image': {
                    'id': '123',
                    'sk': 'EMAIL_VERIFICATION#321',
                    'name': 'Sérgio R Siqueira',
                    'email': 'osergiosiqueira@gmail.com',
                    'org_name': 'EDUSEG',
                },
            },
        },  # type: ignore
        lambda_context,
    )
