mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Add permission check
This commit is contained in:
parent
364775dcfe
commit
4ed3347f52
|
@ -11,6 +11,18 @@ use Tests\TestCase;
|
||||||
|
|
||||||
class BulkDeleteUsersTest extends TestCase
|
class BulkDeleteUsersTest extends TestCase
|
||||||
{
|
{
|
||||||
|
public function testRequiresCorrectPermission()
|
||||||
|
{
|
||||||
|
$this->actingAs(User::factory()->create())
|
||||||
|
->post(route('users/bulksave'), [
|
||||||
|
'ids' => [
|
||||||
|
User::factory()->create()->id,
|
||||||
|
],
|
||||||
|
'status_id' => Statuslabel::factory()->create()->id,
|
||||||
|
])
|
||||||
|
->assertForbidden();
|
||||||
|
}
|
||||||
|
|
||||||
public function testAccessoryCheckinsAreProperlyLogged()
|
public function testAccessoryCheckinsAreProperlyLogged()
|
||||||
{
|
{
|
||||||
[$accessoryA, $accessoryB] = Accessory::factory()->count(2)->create();
|
[$accessoryA, $accessoryB] = Accessory::factory()->count(2)->create();
|
||||||
|
|
Loading…
Reference in a new issue