Added/updated tests

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2025-02-24 13:38:28 +00:00
parent a5009aa7df
commit e60462b751
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,18 @@
<?php
namespace Tests\Feature\Users\Ui;
use App\Models\User;
use Tests\TestCase;
class CloneUserTest extends TestCase
{
public function testPageRenders()
{
$this->actingAs(User::factory()->superuser()->create())
->get(route('users.clone.show', User::factory()->create()))
->assertOk();
}
}

View file

@ -48,6 +48,14 @@ class DeleteUserTest extends TestCase
$this->followRedirects($response)->assertSee(trans('general.error'));
}
public function testCanViewSoftDeletedUser()
{
$user = User::factory()->deletedUser()->viewUsers()->create();
$response = $this->actingAs(User::factory()->deleteUsers()->viewUsers()->create())
->get(route('users.show', $user->id))
->assertStatus(200);
}
public function testFmcsPermissionsToDeleteUser()
{