24 lines
803 B
PHP
24 lines
803 B
PHP
<?php
|
|
|
|
use App\Enums\ProductStatus;
|
|
|
|
test('product status has correct values', function () {
|
|
expect(ProductStatus::Draft->value)->toBe('draft');
|
|
expect(ProductStatus::Pending->value)->toBe('pending');
|
|
expect(ProductStatus::Correction->value)->toBe('correction');
|
|
expect(ProductStatus::Active->value)->toBe('active');
|
|
expect(ProductStatus::Archived->value)->toBe('archived');
|
|
expect(ProductStatus::Sold->value)->toBe('sold');
|
|
});
|
|
|
|
test('product status has labels', function () {
|
|
foreach (ProductStatus::cases() as $status) {
|
|
expect($status->label())->toBeString()->not->toBeEmpty();
|
|
}
|
|
});
|
|
|
|
test('product status has colors', function () {
|
|
foreach (ProductStatus::cases() as $status) {
|
|
expect($status->color())->toBeString()->not->toBeEmpty();
|
|
}
|
|
});
|