fix tests

This commit is contained in:
root
2026-06-11 11:46:12 -04:00
parent c91fa2ce4d
commit 5ead80fdc7
1489 changed files with 11349 additions and 10305 deletions
@@ -37,12 +37,12 @@ class ParentPromotionControllerTest extends TestCase
Sanctum::actingAs($parent);
// Start enrollment
$start = $this->postJson('/api/v1/parents/promotions/' . $promotionId . '/start');
$start = $this->postJson('/api/v1/parents/promotions/'.$promotionId.'/start');
$start->assertOk();
$start->assertJsonPath('data.promotion_status', StudentPromotionRecord::STATUS_ENROLLMENT_STARTED);
// Complete the checklist incrementally
$update = $this->patchJson('/api/v1/parents/promotions/' . $promotionId . '/steps', [
$update = $this->patchJson('/api/v1/parents/promotions/'.$promotionId.'/steps', [
'info_confirmed' => true,
'documents_uploaded' => true,
'agreement_accepted' => true,
@@ -51,7 +51,7 @@ class ParentPromotionControllerTest extends TestCase
$update->assertJsonPath('data.promotion_status', StudentPromotionRecord::STATUS_ENROLLMENT_STARTED);
// Final step finalises promotion
$finish = $this->patchJson('/api/v1/parents/promotions/' . $promotionId . '/steps', [
$finish = $this->patchJson('/api/v1/parents/promotions/'.$promotionId.'/steps', [
'payment_completed' => true,
]);
$finish->assertOk();
@@ -72,7 +72,7 @@ class ParentPromotionControllerTest extends TestCase
$promotionId = $this->seedPromotionRecord($studentId, $parentB->id);
Sanctum::actingAs($parentA);
$response = $this->getJson('/api/v1/parents/promotions/' . $promotionId);
$response = $this->getJson('/api/v1/parents/promotions/'.$promotionId);
$response->assertStatus(403);
}
@@ -140,6 +140,7 @@ class ParentPromotionControllerTest extends TestCase
'promoted_level_name' => 'Grade 4',
'enrollment_deadline' => now()->addDays(30)->toDateString(),
]);
return (int) $record->getKey();
}
}