fix(models): correct UserSetting import namespace and add test coverage

This commit is contained in:
2026-09-07 18:34:51 +02:00
parent 208efbb85d
commit 3502c3e85b
34 changed files with 2497 additions and 2 deletions
+38
View File
@@ -0,0 +1,38 @@
<?php
namespace Tests\Unit\Models;
use App\Features\Games\Models\Game;
use App\Features\Games\Models\RomFile;
use Illuminate\Foundation\Testing\RefreshDatabase;
use PHPUnit\Framework\Attributes\Test;
use Tests\TestCase;
class RomFileTest extends TestCase
{
use RefreshDatabase;
#[Test]
public function it_belongs_to_a_game(): void
{
$romFile = RomFile::factory()->create();
$this->assertInstanceOf(Game::class, $romFile->game);
}
#[Test]
public function it_has_fillable_attributes(): void
{
$romFile = new RomFile();
$this->assertEquals([
'game_id',
'file_path',
'file_name',
'file_size',
'file_hash',
'region',
'language',
], $romFile->getFillable());
}
}