mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Improve readability
This commit is contained in:
parent
a55693211f
commit
96fafa6952
|
@ -74,10 +74,6 @@ class BulkDeleteUsersTest extends TestCase
|
||||||
$this->attachAccessoryToUsers($accessoryA, [$userA, $userB, $userC]);
|
$this->attachAccessoryToUsers($accessoryA, [$userA, $userB, $userC]);
|
||||||
$this->attachAccessoryToUsers($accessoryB, [$userA, $userB]);
|
$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())
|
$this->actingAs(User::factory()->editUsers()->create())
|
||||||
->post(route('users/bulksave'), [
|
->post(route('users/bulksave'), [
|
||||||
'ids' => [
|
'ids' => [
|
||||||
|
@ -103,13 +99,9 @@ class BulkDeleteUsersTest extends TestCase
|
||||||
{
|
{
|
||||||
[$userA, $userB, $userC] = User::factory()->count(3)->create();
|
[$userA, $userB, $userC] = User::factory()->count(3)->create();
|
||||||
|
|
||||||
$assetA = $this->assignAssetToUser($userA);
|
$assetForUserA = $this->assignAssetToUser($userA);
|
||||||
$assetB = $this->assignAssetToUser($userB);
|
$lonelyAsset = $this->assignAssetToUser($userB);
|
||||||
$assetC = $this->assignAssetToUser($userC);
|
$assetForUserC = $this->assignAssetToUser($userC);
|
||||||
|
|
||||||
$this->assertTrue($userA->assets->isNotEmpty());
|
|
||||||
$this->assertTrue($userB->assets->isNotEmpty());
|
|
||||||
$this->assertTrue($userC->assets->isNotEmpty());
|
|
||||||
|
|
||||||
$this->actingAs(User::factory()->editUsers()->create())
|
$this->actingAs(User::factory()->editUsers()->create())
|
||||||
->post(route('users/bulksave'), [
|
->post(route('users/bulksave'), [
|
||||||
|
@ -125,8 +117,8 @@ class BulkDeleteUsersTest extends TestCase
|
||||||
$this->assertTrue($userB->fresh()->assets->isNotEmpty());
|
$this->assertTrue($userB->fresh()->assets->isNotEmpty());
|
||||||
$this->assertTrue($userC->fresh()->assets->isEmpty());
|
$this->assertTrue($userC->fresh()->assets->isEmpty());
|
||||||
|
|
||||||
$this->assertActionLogCheckInEntryFor($userA, $assetA);
|
$this->assertActionLogCheckInEntryFor($userA, $assetForUserA);
|
||||||
$this->assertActionLogCheckInEntryFor($userC, $assetC);
|
$this->assertActionLogCheckInEntryFor($userC, $assetForUserC);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testConsumablesCanBeBulkCheckedIn()
|
public function testConsumablesCanBeBulkCheckedIn()
|
||||||
|
@ -138,10 +130,6 @@ class BulkDeleteUsersTest extends TestCase
|
||||||
$this->attachConsumableToUsers($consumableA, [$userA, $userB, $userC]);
|
$this->attachConsumableToUsers($consumableA, [$userA, $userB, $userC]);
|
||||||
$this->attachConsumableToUsers($consumableB, [$userA, $userB]);
|
$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())
|
$this->actingAs(User::factory()->editUsers()->create())
|
||||||
->post(route('users/bulksave'), [
|
->post(route('users/bulksave'), [
|
||||||
'ids' => [
|
'ids' => [
|
||||||
|
|
Loading…
Reference in a new issue