diff --git a/app/Member/MemberResource.php b/app/Member/MemberResource.php index a24a7282..972977d8 100644 --- a/app/Member/MemberResource.php +++ b/app/Member/MemberResource.php @@ -54,6 +54,7 @@ class MemberResource extends JsonResource 'other_country' => $this->other_country, 'confession_id' => $this->confession_id, 'letter_address' => $this->letter_address, + 'bill_kind' => optional($this->bill_kind)->value, 'bill_kind_name' => optional($this->bill_kind)->value, 'has_nami' => null !== $this->nami_id, 'children_phone' => $this->children_phone, diff --git a/tests/Feature/Member/EditTest.php b/tests/Feature/Member/EditTest.php index 13b4aa6c..fb48b263 100644 --- a/tests/Feature/Member/EditTest.php +++ b/tests/Feature/Member/EditTest.php @@ -61,4 +61,19 @@ class EditTest extends TestCase 'multiply_more_pv' => true, ], $response, 'data'); } + + public function testItDisplaysSystem(): void + { + $this->withoutExceptionHandling()->login()->loginNami(); + $member = Member::factory() + ->defaults() + ->emailBillKind() + ->create(); + + $response = $this->get(route('member.edit', ['member' => $member])); + + $this->assertInertiaHas([ + 'bill_kind' => 'E-Mail', + ], $response, 'data'); + } }