Added more basic tests

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2024-07-05 11:56:24 +01:00
parent e98823f7fa
commit 8c6ecd35ec
4 changed files with 94 additions and 0 deletions
@@ -0,0 +1,23 @@
<?php
namespace Tests\Feature\Components\Ui;
use App\Models\User;
use Tests\TestCase;
class ComponentIndexTest extends TestCase
{
public function testPermissionRequiredToViewComponentsList()
{
$this->actingAs(User::factory()->create())
->get(route('components.index'))
->assertForbidden();
}
public function testUserCanListComponents()
{
$this->actingAs(User::factory()->superuser()->create())
->get(route('components.index'))
->assertOk();
}
}