Fixes Tests

This commit is contained in:
Refringe 2025-01-30 10:55:30 -05:00
parent 7da825659d
commit 14fcff2b84
Signed by: Refringe
SSH Key Fingerprint: SHA256:t865XsQpfTeqPRBMN2G6+N8wlDjkgUCZF3WGW6O9N/k
2 changed files with 4 additions and 4 deletions

View File

@ -127,9 +127,9 @@ class Mod extends Model
'description' => $this->description,
'thumbnail' => $this->thumbnail,
'featured' => $this->featured,
'created_at' => strtotime($this->created_at),
'updated_at' => strtotime($this->updated_at),
'published_at' => strtotime($this->published_at),
'created_at' => $this->created_at->timestamp,
'updated_at' => $this->updated_at->timestamp,
'published_at' => $this->published_at->timestamp,
'latestVersion' => $this->latestVersion->latestSptVersion->version_formatted,
'latestVersionColorClass' => $this->latestVersion->latestSptVersion->color_class,
];

View File

@ -125,7 +125,7 @@ it('filters mods based featured status', function (): void {
Mod::factory()->create(['name' => 'SmallFeet']);
ModVersion::factory()->recycle($mod)->create(['spt_version_constraint' => '^1.0.0']);
$filters = ['featured' => true];
$filters = ['featured' => 'only'];
$filteredMods = (new ModFilter($filters))->apply()->get();
expect($filteredMods)->toHaveCount(1)->and($filteredMods->first()->id)->toBe($mod->id);