add notifications logic and add support of both JWT and Sanctum

This commit is contained in:
root
2026-03-11 01:20:31 -04:00
parent f6be51576c
commit 182036cc41
141 changed files with 8685 additions and 648 deletions
@@ -0,0 +1,33 @@
<?php
namespace Tests\Unit\Services\System;
use App\Services\System\ConfigUpdateService;
use DateTimeZone;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class ConfigUpdateServiceTest extends TestCase
{
use RefreshDatabase;
public function test_run_task_rejects_unknown_task(): void
{
$service = new ConfigUpdateService();
$result = $service->runTask('unknown', false, false, new DateTimeZone('UTC'));
$this->assertFalse($result['ok']);
}
public function test_run_task_sets_config_when_forced(): void
{
$service = new ConfigUpdateService();
$result = $service->runTask('enable_attendance_on', false, true, new DateTimeZone('UTC'));
$this->assertTrue($result['ok']);
$this->assertDatabaseHas('configuration', [
'config_key' => 'enable_attendance',
'config_value' => '1',
]);
}
}