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
@@ -16,8 +16,8 @@ class AdminAttendanceApiControllerTest extends TestCase
$user = User::factory()->create();
Sanctum::actingAs($user);
$response = $this->getJson('/api/attendance/admin/daily');
$response = $this->getJson('/api/v1/attendance/admin/daily');
$response->assertStatus(200);
}
}
}
@@ -94,7 +94,7 @@ class AttendanceServiceTest extends TestCase
$this->assertTrue($result['ok']);
$this->assertDatabaseHas('attendance_day', [
'class_section_id' => 1,
'date' => '2025-01-01',
'date' => '2025-01-01 00:00:00',
'semester' => 'Fall',
'school_year' => '2025-2026',
]);
@@ -16,7 +16,7 @@ class StaffAttendanceApiControllerTest extends TestCase
$user = User::factory()->create();
Sanctum::actingAs($user);
$response = $this->getJson('/api/attendance/staff/month');
$response = $this->getJson('/api/v1/attendance/staff/month');
$response->assertStatus(200);
}
@@ -26,8 +26,8 @@ class StaffAttendanceApiControllerTest extends TestCase
$user = User::factory()->create();
Sanctum::actingAs($user);
$response = $this->getJson('/api/attendance/staff/admins');
$response = $this->getJson('/api/v1/attendance/staff/admins');
$response->assertStatus(200);
}
}
}
@@ -68,7 +68,7 @@ class StaffAttendanceServiceTest extends TestCase
DB::table('calendar_events')->insert([
'title' => 'No School',
'date' => '2025-09-14',
'date' => '2025-09-21',
'no_school' => 1,
'semester' => 'Fall',
'school_year' => '2025-2026',
@@ -85,6 +85,6 @@ class StaffAttendanceServiceTest extends TestCase
$payload = $service->monthData('Fall', '2025-2026');
$this->assertNotEmpty($payload['sections']);
$this->assertContains('2025-09-14', $payload['noSchoolDays']);
$this->assertContains('2025-09-21', $payload['noSchoolDays']);
}
}
@@ -16,7 +16,7 @@ class TeacherAttendanceApiControllerTest extends TestCase
$user = User::factory()->create();
Sanctum::actingAs($user);
$response = $this->getJson('/api/attendance/teacher/grid');
$response = $this->getJson('/api/v1/attendance/teacher/grid');
$response->assertStatus(200);
}
@@ -26,8 +26,8 @@ class TeacherAttendanceApiControllerTest extends TestCase
$user = User::factory()->create();
Sanctum::actingAs($user);
$response = $this->getJson('/api/attendance/teacher/form');
$response = $this->getJson('/api/v1/attendance/teacher/form');
$this->assertContains($response->status(), [200, 422]);
}
}
}