from aws_lambda_powertools.utilities.typing.lambda_context import LambdaContext
from layercake.dynamodb import DynamoDBPersistenceLayer

import events.update_admin as app


def test_updated_admin(
    seeds,
    dynamodb_persistence_layer: DynamoDBPersistenceLayer,
    lambda_context: LambdaContext,
):
    event = {
        'detail': {
            'new_image': {
                'id': '5OxmMjL-ujoR5IMGegQz',
                'sk': '0',
                'name': 'Sérgio R Siqueira',
                'email': 'osergiosiqueira@gmail.com',
            },
        },
    }

    assert app.lambda_handler(event, lambda_context)  # type: ignore
