mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-06-17 16:40:31 +00:00
✨ Add attendee count helpers and enhance Meetup API responses
- ➕ Introduce `attendeesCount` and `mightAttendeesCount` methods in `MeetupEvent` model for cleaner attendee calculations. - 🛠️ Refactor API responses to use attendee count helpers in `Meetup` and `MeetupEventController`. - 🧪 Update tests to validate JSON structure with attendee-related fields (`id`, `attendees`, `might_attendees`).
This commit is contained in:
@@ -80,7 +80,9 @@ it('returns meetup events as JSON on GET /api/meetup-events', function () {
|
||||
|
||||
$response = $this->getJson('/api/meetup-events');
|
||||
|
||||
$response->assertSuccessful();
|
||||
$response->assertSuccessful()
|
||||
// id + Zähler werden für das RSVP im mobilen Slide-In gebraucht.
|
||||
->assertJsonStructure([['id', 'start', 'attendees', 'might_attendees', 'meetup.name']]);
|
||||
expect($response->json())->toBeArray()->not->toBeEmpty();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user