Fixed bug selecting eating habits

This commit is contained in:
2026-10-04 14:36:15 +02:00
parent bcebe2ebed
commit 9e9ea0cfd5
7 changed files with 142 additions and 12 deletions
+5 -2
View File
@@ -48,13 +48,16 @@ class SignUpPaymentOptionsTest extends TestCase
private function createEvent(): Event
{
return Event::create([
$event = Event::create([
'tenant' => $this->tenant->slug, 'name' => 'Event', 'identifier' => 'evt-1', 'location' => 'Ort',
'postal_code' => '00000', 'email' => 'e@example.com', 'start_date' => '2026-08-01', 'end_date' => '2026-08-05',
'early_bird_end' => '2026-07-01', 'registration_final_end' => '2026-07-20', 'early_bird_end_amount_increase' => 0,
'account_owner' => 'Owner', 'account_iban' => 'DE00', 'participation_fee_type' => 'FIXED',
'pay_per_day' => false, 'pay_direct' => false,
]);
$event->eatingHabits()->attach(EatingHabit::where('slug', EatingHabit::EATING_HABIT_VEGAN)->first()->id);
return $event;
}
private function signUpRequest(Event $event, array $paymentOptions): SignUpRequest
@@ -63,7 +66,7 @@ class SignUpPaymentOptionsTest extends TestCase
$event, null, 'Hans', 'Muster', null, ParticipationType::PARTICIPATION_TYPE_PARTICIPANT,
$this->tenant, new \DateTime('2000-01-01'), 'Weg 1', null, '00000', 'Stadt',
'h@example.com', '123', null, null, null, null, null, null, null,
'vegan', null, null, false, false, false, false, false,
EatingHabit::EATING_HABIT_VEGAN, null, null, false, false, false, false, false,
new \DateTime('2026-08-01'), new \DateTime('2026-08-05'), 0, 0, null,
new Amount(50.0, ' Euro'), PaymentMethod::PAYMENT_ACCOUNT_TRANSACTION, $paymentOptions,
);