From cda691ea2b337da8efd353351c16da63cc859633 Mon Sep 17 00:00:00 2001 From: Adrian Hopek Date: Tue, 17 May 2022 15:27:05 +0200 Subject: [PATCH] #134 - fix --- database/factories/ResumeFactory.php | 2 +- tests/Feature/ResumeTest.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/database/factories/ResumeFactory.php b/database/factories/ResumeFactory.php index 15c0f72..6474a8a 100644 --- a/database/factories/ResumeFactory.php +++ b/database/factories/ResumeFactory.php @@ -17,7 +17,7 @@ class ResumeFactory extends Factory public function definition(): array { return [ - "name" => fn(array $attributes): bool => empty($attributes["user_id"]) ? $this->faker->name : null, + "name" => fn(array $attributes): ?string => empty($attributes["user_id"]) ? $this->faker->name : null, "education" => $this->generateEducation(), "languages" => $this->generateLanguages(), "technologies" => $this->generateTechnologies(), diff --git a/tests/Feature/ResumeTest.php b/tests/Feature/ResumeTest.php index e3683a0..c7d1c70 100644 --- a/tests/Feature/ResumeTest.php +++ b/tests/Feature/ResumeTest.php @@ -6,6 +6,7 @@ namespace Tests\Feature; use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Support\Carbon; +use Illuminate\Support\Facades\Storage; use Inertia\Testing\AssertableInertia as Assert; use Tests\FeatureTestCase; use Toby\Domain\Enums\EmploymentForm; @@ -21,6 +22,8 @@ class ResumeTest extends FeatureTestCase { parent::setUp(); + Storage::fake(); + Technology::factory()->createMany([ ["name" => "Laravel"], ["name" => "Symfony"],