Skip to content

A free open source IT asset/license management system

Improve readability

Marcus Moore96fafa6952c0
diff --git a/tests/Feature/Users/Ui/BulkActions/BulkDeleteUsersTest.php b/tests/Feature/Users/Ui/BulkActions/BulkDeleteUsersTest.php
index bc5e50b5fa..f9f1c27de8 100644
--- a/tests/Feature/Users/Ui/BulkActions/BulkDeleteUsersTest.php
+++ b/tests/Feature/Users/Ui/BulkActions/BulkDeleteUsersTest.php
@@ -74,10 +74,6 @@ class BulkDeleteUsersTest extends TestCase
$this->attachAccessoryToUsers($accessoryA, [$userA, $userB, $userC]);
$this->attachAccessoryToUsers($accessoryB, [$userA, $userB]);
- $this->assertTrue($userA->accessories->isNotEmpty());
- $this->assertTrue($userB->accessories->isNotEmpty());
- $this->assertTrue($userC->accessories->isNotEmpty());
-
$this->actingAs(User::factory()->editUsers()->create())
->post(route('users/bulksave'), [
'ids' => [
@@ -103,13 +99,9 @@ class BulkDeleteUsersTest extends TestCase
{
[$userA, $userB, $userC] = User::factory()->count(3)->create();
- $assetA = $this->assignAssetToUser($userA);
- $assetB = $this->assignAssetToUser($userB);
- $assetC = $this->assignAssetToUser($userC);
-
- $this->assertTrue($userA->assets->isNotEmpty());
- $this->assertTrue($userB->assets->isNotEmpty());
- $this->assertTrue($userC->assets->isNotEmpty());
+ $assetForUserA = $this->assignAssetToUser($userA);
+ $lonelyAsset = $this->assignAssetToUser($userB);
+ $assetForUserC = $this->assignAssetToUser($userC);
$this->actingAs(User::factory()->editUsers()->create())
->post(route('users/bulksave'), [
@@ -125,8 +117,8 @@ class BulkDeleteUsersTest extends TestCase
$this->assertTrue($userB->fresh()->assets->isNotEmpty());
$this->assertTrue($userC->fresh()->assets->isEmpty());
- $this->assertActionLogCheckInEntryFor($userA, $assetA);
- $this->assertActionLogCheckInEntryFor($userC, $assetC);
+ $this->assertActionLogCheckInEntryFor($userA, $assetForUserA);
+ $this->assertActionLogCheckInEntryFor($userC, $assetForUserC);
}
public function testConsumablesCanBeBulkCheckedIn()
@@ -138,10 +130,6 @@ class BulkDeleteUsersTest extends TestCase
$this->attachConsumableToUsers($consumableA, [$userA, $userB, $userC]);
$this->attachConsumableToUsers($consumableB, [$userA, $userB]);
- $this->assertTrue($userA->consumables->isNotEmpty());
- $this->assertTrue($userB->consumables->isNotEmpty());
- $this->assertTrue($userC->consumables->isNotEmpty());
-
$this->actingAs(User::factory()->editUsers()->create())
->post(route('users/bulksave'), [
'ids' => [