from datetime import UTC
from uuid import UUID, uuid4

from template_project.application.notification_device.entity import NotificationDevice
from template_project.application.user.entity import UserId


def test_notification_device_factory_creates_valid_device() -> None:
    user_id = UserId(uuid4())

    device = NotificationDevice.factory(
        user_id=user_id,
        device_id="device_123",
    )

    assert isinstance(device.id, UUID)
    assert device.user_id == user_id
    assert device.device_id == "device_123"
    assert device.deleted_at is None
    assert device.created_at.tzinfo == UTC
