snipe-it/tests/Feature/Licenses/Ui/LicenseIndexTest.php

24 lines
524 B
PHP
Raw Normal View History

<?php
namespace Tests\Feature\Licenses\Ui;
use App\Models\User;
use Tests\TestCase;
class LicenseIndexTest extends TestCase
{
public function testPermissionRequiredToViewLicenseList()
{
$this->actingAs(User::factory()->create())
->get(route('licenses.index'))
->assertForbidden();
}
public function testUserCanListLicenses()
{
$this->actingAs(User::factory()->superuser()->create())
->get(route('licenses.index'))
->assertOk();
}
}