Updated tests

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2025-03-12 17:28:50 +00:00
parent aa8e9f61d2
commit c1601b9a8c
2 changed files with 12 additions and 2 deletions

View file

@ -9,9 +9,15 @@ class ShowModalsTest extends TestCase
{
public function testUserModalRenders()
{
$this->actingAs(User::factory()->createUsers()->create())
$admin = User::factory()->createUsers()->create();
$response = $this->actingAs($admin)
->get('modals/user')
->assertOk();
$response->assertStatus(200);
$response->assertDontSee($admin->first_name);
$response->assertDontSee($admin->last_name);
$response->assertDontSee($admin->email);
}
public function testDepartmentModalRenders()

View file

@ -9,8 +9,12 @@ class CreateUserTest extends TestCase
{
public function testPageRenders()
{
$this->actingAs(User::factory()->superuser()->create())
$admin = User::factory()->createUsers()->create();
$response = $this->actingAs(User::factory()->superuser()->create())
->get(route('users.create'))
->assertOk();
$response->assertDontSee($admin->first_name);
$response->assertDontSee($admin->last_name);
$response->assertDontSee($admin->email);
}
}