Something went wrong. Try again.
Store your seeds
Something went wrong. Try again.
123456789101112131415161718192021222324252627<?php
declare(strict_types=1);
namespace Tests\Feature;
use App\Models\Seed;use App\Models\User;
test('seed belongs to a user', function (): void { $seed = Seed::factory()->create();
expect($seed->user)->toBeInstanceOf(User::class);});
test('seed has efforts', function (): void { $seed = Seed::factory()->create();
expect($seed->efforts)->toBeEmpty();
$seed->efforts()->create([ 'description' => 'Water the seed', ]);
expect($seed->fresh()->efforts)->toHaveCount(1);});