Fixed MembershipStoreAction
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
58fdfe1e81
commit
407338d431
|
@ -68,6 +68,7 @@ class MembershipStoreAction
|
||||||
'activity_id' => ['bail', 'required', 'exists:activities,id'],
|
'activity_id' => ['bail', 'required', 'exists:activities,id'],
|
||||||
'subactivity_id' => $subactivityRule,
|
'subactivity_id' => $subactivityRule,
|
||||||
'promised_at' => ['nullable', 'date'],
|
'promised_at' => ['nullable', 'date'],
|
||||||
|
'group_id' => ['required', 'exists:groups,id'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,6 +80,7 @@ class MembershipStoreAction
|
||||||
return [
|
return [
|
||||||
'activity_id' => 'Tätigkeit',
|
'activity_id' => 'Tätigkeit',
|
||||||
'subactivity_id' => 'Untertätigkeit',
|
'subactivity_id' => 'Untertätigkeit',
|
||||||
|
'group_id' => 'Gruppierung',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -179,6 +179,18 @@ class StoreTest extends TestCase
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testGroupIsRequired(): void
|
||||||
|
{
|
||||||
|
$member = Member::factory()->defaults()->for(Group::factory()->inNami(1400))->inNami(6)->create();
|
||||||
|
|
||||||
|
$response = $this->post(
|
||||||
|
"/member/{$member->id}/membership",
|
||||||
|
[],
|
||||||
|
);
|
||||||
|
|
||||||
|
$response->assertSessionHasErrors(['group_id' => 'Gruppierung ist erforderlich.']);
|
||||||
|
}
|
||||||
|
|
||||||
public function testSubactivityCanBeEmpty(): void
|
public function testSubactivityCanBeEmpty(): void
|
||||||
{
|
{
|
||||||
$this->withoutExceptionHandling();
|
$this->withoutExceptionHandling();
|
||||||
|
|
Loading…
Reference in New Issue