withoutExceptionHandling(); $accessory = Accessory::factory()->checkedOutToUser()->create(); $accessory->category->delete(); $this->actingAs(User::factory()->checkinAccessories()->create()) ->post(route('accessories.checkin.store', $accessory->checkouts->first()->id)); $this->assertEquals(0, $accessory->fresh()->checkouts->count()); } }