From c1601b9a8c8a4a80fd7cd30015e7f62822b39b3d Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 12 Mar 2025 17:28:50 +0000 Subject: [PATCH] Updated tests Signed-off-by: snipe --- tests/Feature/Modals/Ui/ShowModalsTest.php | 8 +++++++- tests/Feature/Users/Ui/CreateUserTest.php | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/Feature/Modals/Ui/ShowModalsTest.php b/tests/Feature/Modals/Ui/ShowModalsTest.php index 308460999..6da781d31 100644 --- a/tests/Feature/Modals/Ui/ShowModalsTest.php +++ b/tests/Feature/Modals/Ui/ShowModalsTest.php @@ -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() diff --git a/tests/Feature/Users/Ui/CreateUserTest.php b/tests/Feature/Users/Ui/CreateUserTest.php index 63d27d3d1..456190ee3 100644 --- a/tests/Feature/Users/Ui/CreateUserTest.php +++ b/tests/Feature/Users/Ui/CreateUserTest.php @@ -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); } }