<?php

namespace Tests\Unit\Models;

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

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

        $this->assertSame('purchase_order_items', $model->getTable());
        $this->assertSame('id', $model->getKeyName());
        $this->assertSame(true, $model->timestamps);
        $this->assertSame(["purchase_order_id", "supply_id", "description", "quantity", "received_qty", "unit_cost"], $model->getFillable());
    }

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