<?php

it('registers the aggregated superuser system status endpoint and permission', function (): void {
    $content = file_get_contents(app_path('routes/superuserSystemStatusRoute.php'));

    expect($content)->not->toBeFalse();
    expect($content)->toContain('/superuser/system/status');
    expect($content)->toContain("requirePermission('superuser_system_status_view')");
    expect($content)->toContain('new superuser_system_status_service()');
    expect($content)->toContain("'force'");
});

it('keeps the legacy database status endpoint wired through the shared snapshot service', function (): void {
    $content = file_get_contents(app_path('routes/superuserSystemStatusRoute.php'));

    expect($content)->not->toBeFalse();
    expect($content)->toContain('/superuser/system/database/status');
    expect($content)->toContain("dependencies']['database'");
});
