Skip to content

Commit c1601b9

Browse files
committed
Updated tests
Signed-off-by: snipe <[email protected]>
1 parent aa8e9f6 commit c1601b9

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

tests/Feature/Modals/Ui/ShowModalsTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@ class ShowModalsTest extends TestCase
99
{
1010
public function testUserModalRenders()
1111
{
12-
$this->actingAs(User::factory()->createUsers()->create())
12+
$admin = User::factory()->createUsers()->create();
13+
$response = $this->actingAs($admin)
1314
->get('modals/user')
1415
->assertOk();
16+
17+
$response->assertStatus(200);
18+
$response->assertDontSee($admin->first_name);
19+
$response->assertDontSee($admin->last_name);
20+
$response->assertDontSee($admin->email);
1521
}
1622

1723
public function testDepartmentModalRenders()

tests/Feature/Users/Ui/CreateUserTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ class CreateUserTest extends TestCase
99
{
1010
public function testPageRenders()
1111
{
12-
$this->actingAs(User::factory()->superuser()->create())
12+
$admin = User::factory()->createUsers()->create();
13+
$response = $this->actingAs(User::factory()->superuser()->create())
1314
->get(route('users.create'))
1415
->assertOk();
16+
$response->assertDontSee($admin->first_name);
17+
$response->assertDontSee($admin->last_name);
18+
$response->assertDontSee($admin->email);
1519
}
1620
}

0 commit comments

Comments
 (0)