Add test for blocks
This commit is contained in:
parent
ae39c8dd31
commit
4f1c02acac
|
@ -238,4 +238,22 @@ class FormRegisterMailTest extends FormTestCase
|
|||
$mail->assertDontSeeInText('::content::');
|
||||
}
|
||||
}
|
||||
|
||||
public function testItSendsEmailWhenMailTopIsEmpty(): void
|
||||
{
|
||||
$this->login()->loginNami()->withoutExceptionHandling();
|
||||
|
||||
$participant = Participant::factory()->for(
|
||||
Form::factory()
|
||||
->fields([
|
||||
$this->textField('firstname')->specialType(SpecialType::FIRSTNAME),
|
||||
$this->textField('lastname')->specialType(SpecialType::LASTNAME),
|
||||
])->state(['mail_top' => []])
|
||||
)
|
||||
->data(['firstname' => 'Max', 'lastname' => 'Muster'])
|
||||
->create();
|
||||
|
||||
$mail = new ConfirmRegistrationMail($participant);
|
||||
$mail->assertSeeInText('Max');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue