mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Add assertion
This commit is contained in:
parent
67b3ab820f
commit
8a206a6d92
|
@ -116,6 +116,25 @@ class BulkDeleteUsersTest extends TestCase
|
|||
$this->assertActionLogCheckInEntryFor($userC, $consumableA);
|
||||
}
|
||||
|
||||
public function testUsersCanBeDeletedInBulk()
|
||||
{
|
||||
[$userA, $userB, $userC] = User::factory()->count(3)->create();
|
||||
|
||||
$this->actingAs(User::factory()->editUsers()->create())
|
||||
->post(route('users/bulksave'), [
|
||||
'ids' => [
|
||||
$userA->id,
|
||||
$userC->id,
|
||||
],
|
||||
'delete_user' => '1',
|
||||
])
|
||||
->assertRedirect();
|
||||
|
||||
$this->assertSoftDeleted($userA);
|
||||
$this->assertNotSoftDeleted($userB);
|
||||
$this->assertSoftDeleted($userC);
|
||||
}
|
||||
|
||||
private function attachAccessoryToUsers(Accessory $accessory, array $users): void
|
||||
{
|
||||
foreach ($users as $user) {
|
||||
|
|
Loading…
Reference in a new issue