From 2479ccc4c636af1517cdc5184c2d9903177ffefa Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 5 Jun 2024 14:07:18 +0100 Subject: [PATCH] Fixed accessory assignment Signed-off-by: snipe --- tests/Feature/Users/Ui/DeleteUserTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Feature/Users/Ui/DeleteUserTest.php b/tests/Feature/Users/Ui/DeleteUserTest.php index f5e4b46b02..2be2240563 100644 --- a/tests/Feature/Users/Ui/DeleteUserTest.php +++ b/tests/Feature/Users/Ui/DeleteUserTest.php @@ -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());