<?php

use App\Services\Auth\RoleCapabilityMap;
use App\Support\Auth\Capabilities;
use App\Support\TenantRole;

it('role map only references registry entries', function () {
    $registry = Capabilities::all();

    foreach (TenantRole::cases() as $role) {
        foreach (RoleCapabilityMap::getCapabilities($role) as $capability) {
            expect($registry)->toContain($capability);
        }
    }
});
