fix logic and tests, update docker CI file

This commit is contained in:
root
2026-03-09 15:58:44 -04:00
parent 1cb3573d4b
commit 79e44fe037
188 changed files with 1776 additions and 524 deletions
@@ -42,7 +42,7 @@ class AttendanceCommunicationSupportServiceTest extends TestCase
]);
$service = $this->makeService();
$dates = $service->getViolationDatesForStudent(1, 'ABS_1');
$dates = $service->getViolationDatesForStudent(1, 'ABS_1', '2025-01-01');
$this->assertSame(['2025-01-01'], $dates);
}
@@ -19,7 +19,7 @@ class AttendanceNotificationLogServiceTest extends TestCase
$this->assertDatabaseHas('parent_notifications', [
'student_id' => 1,
'code' => 'ABS_1',
'incident_date' => '2025-01-01',
'incident_date' => '2025-01-01 00:00:00',
'channel' => 'email',
'to_address' => 'parent@example.com',
'status' => 'sent',
@@ -27,6 +27,9 @@ class AttendanceNotificationWorkflowServiceTest extends TestCase
'school_year' => '2025-2026',
]);
$parentLookup = Mockery::mock(\App\Services\AttendanceTracking\AttendanceParentLookupService::class);
$parentLookup->shouldReceive('getPrimaryParentForStudent')->once()->andReturn([]);
$service = new AttendanceNotificationWorkflowService(
new \App\Models\Student(),
new \App\Models\StudentClass(),
@@ -35,7 +38,7 @@ class AttendanceNotificationWorkflowServiceTest extends TestCase
new \App\Models\Configuration(),
Mockery::mock(\App\Services\AttendanceTracking\AttendanceMailerService::class),
Mockery::mock(\App\Services\AttendanceTracking\ViolationRuleEngineService::class),
Mockery::mock(\App\Services\AttendanceTracking\AttendanceParentLookupService::class),
$parentLookup,
Mockery::mock(\App\Services\AttendanceTracking\AttendanceEmailComposerService::class),
Mockery::mock(\App\Services\AttendanceTracking\AttendanceNotificationLogService::class)
);