<?php

use App\Enums\DataChangeStatus;

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

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

test('data change status enum options', function () {
    expect(DataChangeStatus::options())->toEqual([
        1 => 'Menunggu Verifikasi',
        2 => 'Disetujui',
        3 => 'Ditolak',
    ]);
});

test('data change status enum values and comment', function () {
    expect(DataChangeStatus::values())->toEqual([1, 2, 3]);
    expect(DataChangeStatus::comment())->toBe('1: Menunggu Verifikasi, 2: Disetujui, 3: Ditolak');
});
