<?php

declare(strict_types=1);

use App\Support\Links\RequiredPermissionsLinks;
use Illuminate\Support\Facades\Queue;

it('renders the canonical required permissions page without Graph, outbound HTTP, or queue dispatches', function (): void {
    bindFailHardGraphClient();

    [$user, $tenant] = createUserWithTenant(role: 'readonly');

    Queue::fake();

    assertNoOutboundHttp(function () use ($user, $tenant): void {
        $this->actingAs($user)
            ->get(RequiredPermissionsLinks::requiredPermissions($tenant))
            ->assertSuccessful();
    });

    Queue::assertNothingPushed();
});
