Files
2026-06-11 11:46:12 -04:00

28 lines
675 B
PHP

<?php
namespace Tests\Unit\Services\Settings;
use App\Services\Settings\ConfigurationService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class ConfigurationServiceTest extends TestCase
{
use RefreshDatabase;
public function test_store_creates_config(): void
{
$service = new ConfigurationService;
$config = $service->store([
'config_key' => 'school_year',
'config_value' => '2025-2026',
]);
$this->assertNotNull($config->id);
$this->assertDatabaseHas('configuration', [
'id' => $config->id,
'config_key' => 'school_year',
]);
}
}