<?php

use App\Enums\ApprovalStatus;

test('approval status enum has expected cases', function () {
    expect(ApprovalStatus::cases())->toHaveCount(3);
});

test('approval status enum labels and colors', function (ApprovalStatus $status, string $label, string $color) {
    expect($status->getLabel())->toBe($label);
    expect($status->getColor())->toBe($color);
})->with([
    [ApprovalStatus::PENDING, 'Menunggu', 'warning'],
    [ApprovalStatus::ACCEPTED, 'Menerima', 'success'],
    [ApprovalStatus::REJECTED, 'Menolak', 'danger'],
]);

test('approval status enum options', function () {
    expect(ApprovalStatus::options())->toEqual([
        1 => 'Menunggu',
        2 => 'Menerima',
        3 => 'Menolak',
    ]);
});

test('approval status enum values and comment', function () {
    expect(ApprovalStatus::values())->toEqual([1, 2, 3]);
    expect(ApprovalStatus::comment())->toBe('1: Menunggu, 2: Menerima, 3: Menolak');
});
