Files
portal/app/tests/Feature/Admin/AdminDashboardHealthTest.php
T

16 lines
497 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
it('GET /api/admin/dashboard/health returns 6 subsystems with light', function () {
$res = $this->getJson('/api/admin/dashboard/health');
$res->assertOk();
$res->assertJsonStructure([
'subsystems' => [['key', 'light', 'detail']],
'overall_light',
]);
$keys = collect($res->json('subsystems'))->pluck('key')->all();
expect($keys)->toContain('queues', 'scheduler', 'supplier_sync', 'csv_drift', 'webhooks', 'incidents');
});