<?php

use App\Enums\DataChangeDecision;

test('data change decision enum has expected cases', function () {
    expect(DataChangeDecision::cases())->toHaveCount(2);
});

test('data change decision enum labels and colors', function (DataChangeDecision $decision, string $label, string $color) {
    expect($decision->getLabel())->toBe($label);
    expect($decision->getColor())->toBe($color);
})->with([
    [DataChangeDecision::APPROVED, 'Disetujui', 'success'],
    [DataChangeDecision::REJECTED, 'Ditolak', 'danger'],
]);

test('data change decision enum options', function () {
    expect(DataChangeDecision::options())->toEqual([
        1 => 'Disetujui',
        2 => 'Ditolak',
    ]);
});

test('data change decision enum values and comment', function () {
    expect(DataChangeDecision::values())->toEqual([1, 2]);
    expect(DataChangeDecision::comment())->toBe('1: Disetujui, 2: Ditolak');
});
