fix logic and tests, update docker CI file
This commit is contained in:
+1
-1
@@ -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',
|
||||
|
||||
+4
-1
@@ -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)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user