Fix: Update work phone
This commit is contained in:
parent
8b8f598507
commit
f9deb56d22
|
|
@ -75,6 +75,7 @@ class MemberRequest extends FormRequest
|
|||
'send_newspaper' => 'boolean',
|
||||
'main_phone' => ['nullable', new ValidPhoneRule('Telefon (Eltern)')],
|
||||
'mobile_phone' => ['nullable', new ValidPhoneRule('Handy (Eltern)')],
|
||||
'work_phone' => ['nullable', new ValidPhoneRule('Tel geschäftlich')],
|
||||
'invoice_address' => '',
|
||||
'gender_id' => 'nullable|exists:genders,id',
|
||||
'region_id' => 'nullable|exists:regions,id',
|
||||
|
|
|
|||
|
|
@ -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 () {
|
||||
$this->withoutExceptionHandling()->login()->loginNami();
|
||||
$member = factory()->notInNami()->create();
|
||||
|
|
|
|||
Loading…
Reference in New Issue