feat(project-model): fillable + cast paused_at as datetime
This commit is contained in:
@@ -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']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user