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); } }