This commit is contained in:
Adrian Hopek 2022-05-17 15:27:05 +02:00
parent 07ed41223a
commit cda691ea2b
2 changed files with 4 additions and 1 deletions

View File

@ -17,7 +17,7 @@ class ResumeFactory extends Factory
public function definition(): array public function definition(): array
{ {
return [ 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(), "education" => $this->generateEducation(),
"languages" => $this->generateLanguages(), "languages" => $this->generateLanguages(),
"technologies" => $this->generateTechnologies(), "technologies" => $this->generateTechnologies(),

View File

@ -6,6 +6,7 @@ namespace Tests\Feature;
use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Support\Carbon; use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Storage;
use Inertia\Testing\AssertableInertia as Assert; use Inertia\Testing\AssertableInertia as Assert;
use Tests\FeatureTestCase; use Tests\FeatureTestCase;
use Toby\Domain\Enums\EmploymentForm; use Toby\Domain\Enums\EmploymentForm;
@ -21,6 +22,8 @@ class ResumeTest extends FeatureTestCase
{ {
parent::setUp(); parent::setUp();
Storage::fake();
Technology::factory()->createMany([ Technology::factory()->createMany([
["name" => "Laravel"], ["name" => "Laravel"],
["name" => "Symfony"], ["name" => "Symfony"],