Fix: Update work phone

This commit is contained in:
philipp lang 2025-11-18 12:36:08 +01:00
parent 8b8f598507
commit f9deb56d22
2 changed files with 13 additions and 0 deletions

View File

@ -75,6 +75,7 @@ class MemberRequest extends FormRequest
'send_newspaper' => 'boolean', 'send_newspaper' => 'boolean',
'main_phone' => ['nullable', new ValidPhoneRule('Telefon (Eltern)')], 'main_phone' => ['nullable', new ValidPhoneRule('Telefon (Eltern)')],
'mobile_phone' => ['nullable', new ValidPhoneRule('Handy (Eltern)')], 'mobile_phone' => ['nullable', new ValidPhoneRule('Handy (Eltern)')],
'work_phone' => ['nullable', new ValidPhoneRule('Tel geschäftlich')],
'invoice_address' => '', 'invoice_address' => '',
'gender_id' => 'nullable|exists:genders,id', 'gender_id' => 'nullable|exists:genders,id',
'region_id' => 'nullable|exists:regions,id', 'region_id' => 'nullable|exists:regions,id',

View File

@ -157,6 +157,18 @@ it('testItSetsLocationToNull', function () {
]); ]);
}); });
it('updates work phone', function () {
$this->withoutExceptionHandling()->login()->loginNami();
$member = factory()->notInNami()->create();
fakeRequest();
NamiPutMemberAction::allowToRun();
$this->patch("/member/{$member->id}", MemberUpdateRequestFactory::new()->noNami()->create([
'work_phone' => '+49 212 1353688',
]));
test()->assertDatabaseHas('members', ['work_phone' => '+49 212 1353688']);
});
it('testItUpdatesContact', function () { it('testItUpdatesContact', function () {
$this->withoutExceptionHandling()->login()->loginNami(); $this->withoutExceptionHandling()->login()->loginNami();
$member = factory()->notInNami()->create(); $member = factory()->notInNami()->create();