ldc-arcadia-api/tests/Integration/Infra/Database/Models/EmployeeModelTest.php
Jérémy Munsch 1d55dff5f4
feat(seeders): add IncoSheet and IncoCompo seeders
Implement seeders for IncoSheet and IncoCompo to populate the database with initial data.
2026-08-14 10:35:21 +02:00

27 lines
681 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Integration\Infra\Database\Models;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Infra\Database\Models\Employee;
use Tests\TestCase;
covers(Employee::class);
uses(TestCase::class, RefreshDatabase::class);
describe('Employee Eloquent Model & Factory', function (): void {
it('creates and persists an Employee record via factory', function (): void {
// GIVEN
$employee = Employee::factory()->create();
// WHEN
$retrieved = Employee::find($employee->id);
// THEN
expect($retrieved)->not->toBeNull()
->and($retrieved->id)->toBe($employee->id);
});
});