<?php

declare(strict_types=1);

use App\Filament\Resources\TenantResource;

it('renders provider connections CTA with canonical tenantless URL on tenant detail page', function (): void {
    [$user, $tenant] = createUserWithTenant(role: 'owner');

    $this->actingAs($user)
        ->get(TenantResource::getUrl('view', ['record' => $tenant], tenant: $tenant))
        ->assertOk()
        ->assertSee('/admin/provider-connections?tenant_id='.(string) $tenant->external_id, false);
});
