feat(project-model): fillable + cast paused_at as datetime

This commit is contained in:
Дмитрий
2026-05-26 11:17:05 +03:00
parent 8b6b410119
commit e2e300f4f6
2 changed files with 31 additions and 0 deletions
@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace Tests\Unit\Models;
use App\Models\Project;
use Tests\TestCase;
/**
* Гарантирует, что колонка `paused_at` mass-assignable и cast'ится в datetime.
*
* Связано: SupplierSnapshotGuard (docs/superpowers/plans/2026-05-26-supplier-snapshot-guard.md).
*/
class ProjectPausedAtTest extends TestCase
{
public function test_paused_at_is_in_fillable(): void
{
$fillable = (new Project)->getFillable();
$this->assertContains('paused_at', $fillable);
}
public function test_paused_at_is_cast_to_datetime(): void
{
$casts = (new Project)->getCasts();
$this->assertArrayHasKey('paused_at', $casts);
$this->assertSame('datetime', $casts['paused_at']);
}
}