add more controller
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user