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

This commit is contained in:
fromme committed 2026-10-19 09:18:22 +02:00
1 parent 5b75938c73
commit b958d1a371
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
*/