<?php

namespace Tests\Unit\Models;

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

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

        $this->assertSame('messages', $model->getTable());
        $this->assertSame('id', $model->getKeyName());
        $this->assertSame(false, $model->timestamps);
        $this->assertSame(["sender_id", "recipient_id", "subject", "message", "sent_datetime", "read_status", "read_datetime", "message_number", "priority", "attachment", "status", "semester", "school_year"], $model->getFillable());
    }

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