Mod IndexTest
continuous-integration/drone/push Build is passing Details

This commit is contained in:
philipp lang 2024-01-26 15:33:12 +01:00
parent 998eb8931b
commit ff4ad5daa3
1 changed files with 2 additions and 0 deletions

View File

@ -194,6 +194,7 @@ class IndexTest extends TestCase
public function testItLoadsGroups(): void
{
$this->withoutExceptionHandling();
$parent1 = Group::factory()->name('par1')->create();
$child1 = Group::factory()->name('ch1')->for($parent1, 'parent')->create();
$child2 = Group::factory()->name('ch2')->for($parent1, 'parent')->create();
@ -201,6 +202,7 @@ class IndexTest extends TestCase
$this->withoutExceptionHandling()->login()->loginNami(12345, 'password', $parent1);
$response = $this->get('/member');
$response->assertOk();
$this->assertInertiaHas('par1', $response, 'data.meta.groups.0.name');
$this->assertInertiaHas('- ch1', $response, 'data.meta.groups.1.name');