snipe-it/tests/Feature/Depreciations/Ui/DepreciationsIndexTest.php
snipe d635c86e00 Added tests
Signed-off-by: snipe <snipe@snipe.net>
2024-08-28 12:46:30 +01:00

24 lines
549 B
PHP

<?php
namespace Tests\Feature\Categories\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();
}
}