fix: return proper response for stale participant edit urls

This commit is contained in:
Björn Fromme
2026-04-11 18:28:32 +02:00
parent 63e8a068b3
commit 95d50e9833
3 changed files with 26 additions and 2 deletions
@@ -6,6 +6,7 @@ namespace App\Tests\Service;
use App\BusProNet\Model\Booking;
use App\BusProNet\Model\Travel;
use App\Exception\ParticipantNotFoundException;
use App\Form\Model\BookingDto;
use App\Form\Model\ParticipantDto;
use App\Service\ParticipantFormSupportService;
@@ -19,7 +20,7 @@ class ParticipantFormSupportServiceTest extends TestCase
$service = $this->createService();
$bookingDto = $this->createBookingDto();
$this->expectException(\InvalidArgumentException::class);
$this->expectException(ParticipantNotFoundException::class);
$this->expectExceptionMessage('Participant at index 2 does not exist');
$service->ensureParticipantExists($bookingDto, 2);