<?php

namespace Tests\Unit\Models;

use App\Models\AuthorizedUser;
use PHPUnit\Framework\TestCase;

class AuthorizedUserTest extends TestCase
{
    public function test_model_metadata_is_converted(): void
    {
        $model = new AuthorizedUser();

        $this->assertSame('authorized_users', $model->getTable());
        $this->assertSame('id', $model->getKeyName());
        $this->assertSame(true, $model->timestamps);
        $this->assertSame(["user_id", "authorized_user_id", "firstname", "lastname", "phone_number", "gender", "email", "relation_to_user", "token", "status", "created_at", "updated_at"], $model->getFillable());
    }

    public function test_model_class_loads(): void
    {
        $this->assertInstanceOf(AuthorizedUser::class, new AuthorizedUser());
    }
}
