feat: offer non-travelling applicant choice only on selected travels

This commit is contained in:
fromme committed 2026-10-16 17:49:04 +02:00
1 parent 38f0f23ea3
commit 55a9189284
9 files changed
+320 -26

No files matched your search

+21
View File
@@ -134,6 +134,27 @@ class TravelTest extends TestCase
$this->assertFalse($travel->hasSelectionId(1473));
}
public function testAllowsNonTravellingApplicantWithSelection1488(): void
{
$travel = new Travel();
$travel->selectionGroups = [
10 => $this->createSelectionGroup(10, [2001, 1488]),
];
$this->assertTrue($travel->allowsNonTravellingApplicant());
}
public function testDoesNotAllowNonTravellingApplicantWithoutSelection1488(): void
{
$travel = new Travel();
$travel->selectionGroups = [
10 => $this->createSelectionGroup(10, [1473, 1475]),
];
$this->assertFalse($travel->allowsNonTravellingApplicant());
$this->assertFalse((new Travel())->allowsNonTravellingApplicant(), 'A travel without any selections');
}
/**
* @param list<int> $selectionIds
*/