feat: offer non-travelling applicant choice only on selected travels
This commit is contained in:
1 parent
5b75938c73
commit
b958d1a371
9 files changed
+320
-26
No files matched your search
@@ -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
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user