<?php

use App\Enums\RoleEnum;

test('role enum has expected cases', function () {
    expect(RoleEnum::cases())->toHaveCount(6);
});

test('role enum values', function (RoleEnum $role, string $value) {
    expect($role->value)->toBe($value);
})->with([
    [RoleEnum::DEVELOPER, 'Developer'],
    [RoleEnum::ADMINISTRATOR, 'Administrator'],
    [RoleEnum::ADMIN_MONITORING, 'Admin Monitoring'],
    [RoleEnum::ADMIN_KONTEN, 'Admin Konten'],
    [RoleEnum::ADMIN_KEUANGAN, 'Admin Keuangan'],
    [RoleEnum::PERUSAHAAN, 'Perusahaan'],
]);

test('role enum options', function () {
    expect(RoleEnum::options())->toEqual([
        'Developer' => 'Developer',
        'Administrator' => 'Administrator',
        'Admin Monitoring' => 'Admin Monitoring',
        'Admin Konten' => 'Admin Konten',
        'Admin Keuangan' => 'Admin Keuangan',
        'Perusahaan' => 'Perusahaan',
    ]);
});

test('role enum values method', function () {
    expect(RoleEnum::values())->toEqual([
        'Developer',
        'Administrator',
        'Admin Monitoring',
        'Admin Konten',
        'Admin Keuangan',
        'Perusahaan',
    ]);
});
