Fix MemberIndexTest
continuous-integration/drone/push Build is failing Details

This commit is contained in:
philipp lang 2024-01-26 10:28:05 +01:00
parent 21b0d08864
commit e5d03e862d
1 changed files with 6 additions and 7 deletions

View File

@ -27,10 +27,10 @@ class MemberIndexTest extends TestCase
{ {
$this->withoutExceptionHandling()->login()->loginNami(); $this->withoutExceptionHandling()->login()->loginNami();
$group = Group::factory()->create(); $group = Group::factory()->create();
Member::factory()->defaults()->for($group)->create(['firstname' => '::firstname::']); Member::factory()->defaults()->for($group)->create(['firstname' => 'Alexander']);
Member::factory()->defaults()->for($group)->create(['firstname' => '::gggname::']); Member::factory()->defaults()->for($group)->create(['firstname' => 'Heinrich']);
$response = $this->callFilter('member.index', ['search' => '::firstname::']); $response = $this->callFilter('member.index', ['search' => 'Alexander']);
$this->assertCount(1, $this->inertia($response, 'data.data')); $this->assertCount(1, $this->inertia($response, 'data.data'));
} }
@ -38,10 +38,9 @@ class MemberIndexTest extends TestCase
public function testItHandlesAddress(): void public function testItHandlesAddress(): void
{ {
$this->withoutExceptionHandling()->login()->loginNami(); $this->withoutExceptionHandling()->login()->loginNami();
$group = Group::factory()->create(); Member::factory()->defaults()->for($group)->create(['address' => '']);
Member::factory()->defaults()->for(Group::factory())->create(['address' => '']); Member::factory()->defaults()->for($group)->create(['zip' => '']);
Member::factory()->defaults()->for(Group::factory())->create(['zip' => '']); Member::factory()->defaults()->for($group)->create(['location' => '']);
Member::factory()->defaults()->for(Group::factory())->create(['location' => '']);
$response = $this->callFilter('member.index', ['has_full_address' => true]); $response = $this->callFilter('member.index', ['has_full_address' => true]);
$noResponse = $this->callFilter('member.index', ['has_full_address' => false]); $noResponse = $this->callFilter('member.index', ['has_full_address' => false]);