Fixed accessory assignment

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-06-05 14:07:18 +01:00
parent 64dd8f5d65
commit 2479ccc4c6

View file

@ -45,7 +45,7 @@ class DeleteUserTest extends TestCase
public function testDisallowUserDeletionIfStillHaveAccessories()
{
$user = User::factory()->create();
Accessory::factory()->count(3)->create(['assigned_to' => $user->id]);
Accessory::factory()->count(3)->checkedOutToUser()->create($user);
$this->actingAs(User::factory()->deleteUsers()->create())->assertFalse($user->isDeletable());