fix email body
This commit is contained in:
@@ -85,6 +85,44 @@ final class EnrollmentRegistrationEmailServiceTest extends TestCase
|
||||
$this->assertSame('', $action);
|
||||
}
|
||||
|
||||
public function testMakeupExamDecisionMessageUsesSchoolYearDateBeforeConfig(): void
|
||||
{
|
||||
$configModel = $this->createMock(ConfigurationModel::class);
|
||||
$configModel->expects($this->never())->method('getConfig');
|
||||
|
||||
$service = $this->service(configModel: $configModel);
|
||||
|
||||
$message = $this->invoke($service, 'decisionMessage', ['Student Name', [
|
||||
'deliberation_decision' => DeliberationDecision::MAKE_UP_EXAM,
|
||||
'blockers' => [],
|
||||
], 'August 1, 2026', 'August 31, 2026', [
|
||||
'fall_makeup_exam_on' => '2026-09-13',
|
||||
]]);
|
||||
|
||||
$this->assertStringContainsString('This exam is scheduled for 09-13-2026 from 9:30 AM to 11:00 AM at ISGL.', $message);
|
||||
$this->assertStringNotContainsString('a date to be announced', $message);
|
||||
}
|
||||
|
||||
public function testMakeupExamDecisionMessageFallsBackToSyncedConfigKeys(): void
|
||||
{
|
||||
$configModel = $this->createMock(ConfigurationModel::class);
|
||||
$configModel->expects($this->exactly(2))
|
||||
->method('getConfig')
|
||||
->willReturnMap([
|
||||
['make-up-exam', ''],
|
||||
['make_up_exam', '2026-09-13'],
|
||||
]);
|
||||
|
||||
$service = $this->service(configModel: $configModel);
|
||||
|
||||
$message = $this->invoke($service, 'decisionMessage', ['Student Name', [
|
||||
'deliberation_decision' => DeliberationDecision::MAKE_UP_EXAM,
|
||||
'blockers' => [],
|
||||
], 'August 1, 2026', 'August 31, 2026']);
|
||||
|
||||
$this->assertStringContainsString('This exam is scheduled for 09-13-2026 from 9:30 AM to 11:00 AM at ISGL.', $message);
|
||||
}
|
||||
|
||||
public function testMakeupExamStudentRowRendersMessageLineBreaks(): void
|
||||
{
|
||||
$configModel = $this->createMock(ConfigurationModel::class);
|
||||
|
||||
Reference in New Issue
Block a user