fix: properly handle 'veg' services in booking edit flow
This commit is contained in:
@@ -32,6 +32,7 @@ class BookingEditSubmitGuardTest extends TestCase
|
||||
$workingParticipant = new ParticipantDto();
|
||||
$workingParticipant->index = 0;
|
||||
$workingParticipant->additionalServices = [$this->createService(99)];
|
||||
$workingParticipant->veg = $this->createService(88);
|
||||
$workingParticipant->transportationOutbound = $this->createService(88);
|
||||
$workingParticipant->pickup = $this->createPickup(77);
|
||||
|
||||
@@ -41,6 +42,7 @@ class BookingEditSubmitGuardTest extends TestCase
|
||||
$baselineParticipant = new ParticipantDto();
|
||||
$baselineParticipant->index = 0;
|
||||
$baselineParticipant->additionalServices = [$this->createService(10)];
|
||||
$baselineParticipant->veg = $this->createService(11);
|
||||
$baselineParticipant->transportationOutbound = $this->createService(20);
|
||||
$baselineParticipant->pickup = $this->createPickup(30);
|
||||
|
||||
@@ -58,6 +60,7 @@ class BookingEditSubmitGuardTest extends TestCase
|
||||
|
||||
$this->assertTrue($changed);
|
||||
$this->assertSame([10], array_map(static fn (Service $s) => $s->id, $workingParticipant->additionalServices));
|
||||
$this->assertSame(11, $workingParticipant->veg?->id);
|
||||
$this->assertSame(20, $workingParticipant->transportationOutbound?->id);
|
||||
$this->assertSame(30, $workingParticipant->pickup?->id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user