fix logic and tests, update docker CI file
This commit is contained in:
@@ -33,7 +33,7 @@ class FinancialControllerTest extends TestCase
|
||||
$user = $this->createUser();
|
||||
Sanctum::actingAs($user);
|
||||
|
||||
$response = $this->getJson('/api/v1/finance/financial-summary?school_year=2025-2026');
|
||||
$response = $this->getJson('/api/v1/finance/financial-summary?school_year=2025-2026&date_from=2025-01-01&date_to=2025-12-31');
|
||||
|
||||
$response->assertOk();
|
||||
$response->assertJson(['ok' => true]);
|
||||
@@ -56,6 +56,11 @@ class FinancialControllerTest extends TestCase
|
||||
|
||||
private function seedFinancialData(): void
|
||||
{
|
||||
DB::table('configuration')->insert([
|
||||
'id' => 1,
|
||||
'config_key' => 'school_year',
|
||||
'config_value' => '2025-2026',
|
||||
]);
|
||||
DB::table('users')->insert([
|
||||
[
|
||||
'id' => 2,
|
||||
|
||||
Reference in New Issue
Block a user