snipe-it/tests/Feature/Depreciations/Ui/DepreciationsIndexTest.php
2024-12-16 17:45:10 -08:00

24 lines
552 B
PHP

<?php
namespace Tests\Feature\Depreciations\Ui;
use App\Models\User;
use Tests\TestCase;
class DepreciationsIndexTest extends TestCase
{
public function testPermissionRequiredToViewDepreciationsList()
{
$this->actingAs(User::factory()->create())
->get(route('depreciations.index'))
->assertForbidden();
}
public function testUserCanListDepreciations()
{
$this->actingAs(User::factory()->admin()->create())
->get(route('depreciations.index'))
->assertOk();
}
}