3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-04-08 00:38:03 +00:00
Files
snipe-it/tests/Feature/Livewire/ImporterTest.php
2026-03-16 17:40:57 -07:00

26 lines
553 B
PHP

<?php
namespace Tests\Feature\Livewire;
use App\Livewire\Importer;
use App\Models\User;
use Livewire\Livewire;
use Tests\TestCase;
class ImporterTest extends TestCase
{
public function test_renders_successfully()
{
Livewire::actingAs(User::factory()->canImport()->create())
->test(Importer::class)
->assertStatus(200);
}
public function test_requires_permission()
{
Livewire::actingAs(User::factory()->create())
->test(Importer::class)
->assertStatus(403);
}
}