<?php

use App\Enums\NewsStatus;

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

test('news status enum labels and colors', function (NewsStatus $status, string $label, string $color) {
    expect($status->getLabel())->toBe($label);
    expect($status->getColor())->toBe($color);
})->with([
    [NewsStatus::DRAFT, 'Draft', 'warning'],
    [NewsStatus::PUBLISHED, 'Publish', 'success'],
    [NewsStatus::ARCHIVED, 'Arsip', 'gray'],
]);

test('news status enum options', function () {
    expect(NewsStatus::options())->toEqual([
        1 => 'Draft',
        2 => 'Publish',
        3 => 'Arsip',
    ]);
});

test('news status enum values and comment', function () {
    expect(NewsStatus::values())->toEqual([1, 2, 3]);
    expect(NewsStatus::comment())->toBe('1: Draft, 2: Publish, 3: Arsip');
});
