Add test for checkbox field presenter

This commit is contained in:
philipp lang 2024-04-13 21:49:29 +02:00
parent 93d4511ee8
commit 5e49e5bd59
1 changed files with 3 additions and 1 deletions

View File

@ -42,14 +42,16 @@ class FormRegisterMailTest extends FormTestCase
FormtemplateSectionRequest::new()->name('Persönliches')->fields([
$this->textField('vorname')->name('Vorname')->specialType(SpecialType::FIRSTNAME),
$this->textField('nachname')->specialType(SpecialType::LASTNAME),
$this->checkboxField('fullyear')->name('Volljährig'),
])
]))
->data(['vorname' => 'Max', 'nachname' => 'Muster'])
->data(['vorname' => 'Max', 'nachname' => 'Muster', 'fullyear' => true])
->create();
$mail = new ConfirmRegistrationMail($participant);
$mail->assertSeeInText('# Hallo Max Muster');
$mail->assertSeeInText('## Persönliches');
$mail->assertSeeInText('* Vorname: Max');
$mail->assertSeeInText('* Volljährig: Ja');
}
}