From 14fcff2b84adce72b55fa08e52757df4ebbef1f7 Mon Sep 17 00:00:00 2001 From: Refringe Date: Thu, 30 Jan 2025 10:55:30 -0500 Subject: [PATCH] Fixes Tests --- app/Models/Mod.php | 6 +++--- tests/Feature/Mod/ModFilterTest.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Models/Mod.php b/app/Models/Mod.php index cb2cf34..77bbbf3 100644 --- a/app/Models/Mod.php +++ b/app/Models/Mod.php @@ -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, ]; diff --git a/tests/Feature/Mod/ModFilterTest.php b/tests/Feature/Mod/ModFilterTest.php index df22322..c116991 100644 --- a/tests/Feature/Mod/ModFilterTest.php +++ b/tests/Feature/Mod/ModFilterTest.php @@ -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);