TenantAtlas/apps/platform/tests/Feature/TenantConfiguration/Spec426ExchangeTeamsNoCertificationTest.php
Ahmed Darrazi fb4dc20cb0
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 5m11s
feat: implement Exchange Teams evidence identity readiness
2026-07-03 13:41:08 +02:00

30 lines
1.2 KiB
PHP

<?php
declare(strict_types=1);
use App\Models\TenantConfigurationResourceType;
use App\Services\TenantConfiguration\ClaimGuard;
use App\Services\TenantConfiguration\ResourceTypeRegistry;
use App\Support\TenantConfiguration\ClaimState;
use App\Support\TenantConfiguration\CoverageLevel;
it('Spec426 does not certify selected Exchange and Teams readiness rows or wording', function (): void {
app(ResourceTypeRegistry::class)->syncDefaults();
$rows = TenantConfigurationResourceType::query()
->whereIn('canonical_type', ['transportRule', 'acceptedDomain', 'appPermissionPolicy', 'meetingPolicy'])
->get();
expect($rows)->toHaveCount(4);
foreach ($rows as $row) {
expect($row->allows_certified_claims)->toBeFalse()
->and($row->default_coverage_level)->not->toBe(CoverageLevel::Certified);
}
expect(app(ClaimGuard::class)->evaluateStatement('Selected Exchange resources are certified', internalOperatorOnly: true))
->toBe(ClaimState::ClaimBlocked)
->and(app(ClaimGuard::class)->evaluateStatement('Selected Teams resources are certified', internalOperatorOnly: true))
->toBe(ClaimState::ClaimBlocked);
});