feat: add employee-only supervisor role nominated by crm selection 1487

This commit is contained in:
fromme committed 2026-10-05 17:06:37 +02:00
1 parent 5f95492a7f
commit 93512b8345
6 files changed
+49 -1

No files matched your search

+9
View File
@@ -44,6 +44,15 @@ class RoleTest extends TestCase
self::assertSame([Role::EMPLOYEE, Role::CUSTOMER_EXPERT], $roles);
}
public function testSupervisorClaimOnlyProducesANomination(): void
{
$roles = Role::sync([], [Role::EMPLOYEE, Role::SUPERVISOR]);
self::assertSame([Role::EMPLOYEE, Role::pending(Role::SUPERVISOR)], $roles);
self::assertSame([Role::SUPERVISOR => 'Leitung'], Role::nominatedFrom($roles));
self::assertSame([Role::EMPLOYEE, Role::SUPERVISOR], Role::approve($roles, Role::SUPERVISOR));
}
public function testApprovedRoleSurvivesTheNextSyncAndIsNotMarkedAgain(): void
{
$roles = Role::sync([Role::TEAMER, Role::HOUSE_MANAGER], [Role::HOUSE_MANAGER, Role::TEAMER]);