<?php

use App\Enums\DecisionAdmin;

test('decision admin enum has expected cases', function () {
    expect(DecisionAdmin::cases())->toHaveCount(3);
});

test('decision admin enum labels and colors', function (DecisionAdmin $decision, string $label, string $color) {
    expect($decision->getLabel())->toBe($label);
    expect($decision->getColor())->toBe($color);
})->with([
    [DecisionAdmin::APPROVED, 'Disetujui', 'success'],
    [DecisionAdmin::NEED_REVISION, 'Perlu Revisi', 'info'],
    [DecisionAdmin::REJECTED, 'Ditolak', 'danger'],
]);

test('decision admin enum options', function () {
    expect(DecisionAdmin::options())->toEqual([
        1 => 'Disetujui',
        2 => 'Perlu Revisi',
        3 => 'Ditolak',
    ]);
});

test('decision admin enum values and comment', function () {
    expect(DecisionAdmin::values())->toEqual([1, 2, 3]);
    expect(DecisionAdmin::comment())->toBe('1: Disetujui, 2: Perlu Revisi, 3: Ditolak');
});
