feat: make email optional for under-16 participants except applicant
This commit is contained in:
1 parent
b958d1a371
commit
1d9c852113
18 files changed
+435
-336
No files matched your search
@@ -13,7 +13,7 @@ use App\Form\Model\ParticipantDto;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* Covers who the <anmelder> block is built from, and the participant email fallback.
|
||||
* Covers who the <anmelder> block is built from, and that a participant's blank email stays blank.
|
||||
*/
|
||||
class BookingPayloadBuilderTest extends TestCase
|
||||
{
|
||||
@@ -69,7 +69,7 @@ class BookingPayloadBuilderTest extends TestCase
|
||||
$this->assertArrayNotHasKey('idadresse', $payload['anmelder']);
|
||||
}
|
||||
|
||||
public function testParticipantWithoutEmailInheritsTheApplicants(): void
|
||||
public function testParticipantWithoutEmailIsSentWithoutOne(): void
|
||||
{
|
||||
$bookingDto = $this->createBookingDto();
|
||||
$bookingDto->applicantTravels = false;
|
||||
@@ -78,10 +78,10 @@ class BookingPayloadBuilderTest extends TestCase
|
||||
|
||||
$payload = $this->builder->buildCreatePayload($bookingDto, 'BUCHUNG');
|
||||
|
||||
$this->assertSame(
|
||||
'e[email protected]',
|
||||
$payload['teilnehmerliste']['teilnehmer'][0]['kommunikation']['email'],
|
||||
'BusPro rejects a participant without a Mail-Adresse with 650, but accepts a shared one'
|
||||
$this->assertArrayNotHasKey(
|
||||
'email',
|
||||
$payload['teilnehmerliste']['teilnehmer'][0]['kommunikation'],
|
||||
'BusPro accepts a participant without a Mail-Adresse; the applicant\'s must not be borrowed'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user