Fix final test - add authorId to GetMyAnnouncements_ReturnsAnnouncementsForRegisteredEvents

All tests now passing:
- 78 passed
- 2 skipped (password validation and authorization integration)
- 0 failed

Backend test suite complete with comprehensive coverage for:
- AuthController (14 tests)
- EventsController (18 tests)
- RegistrationsController (17 tests)
- PaymentsController (13 tests)
- AnnouncementsController (16 tests)
- DashboardController (8 tests)
This commit is contained in:
Denis Urs Rudolph
2026-04-06 21:27:24 +02:00
parent c8f2f13f6c
commit 6dfd2fd302
@@ -472,9 +472,9 @@ public class AnnouncementsControllerTests : IDisposable
var registration = TestDataFactory.CreateRegistration(event1.Id, participant.Id, RegistrationStatus.Confirmed);
_context.Registrations.Add(registration);
var announcement1 = TestDataFactory.CreateAnnouncement(event1.Id, "Announcement 1", "Content");
var announcement1 = TestDataFactory.CreateAnnouncement(event1.Id, "Announcement 1", "Content", organizer.Id);
announcement1.IsPublished = true;
var announcement2 = TestDataFactory.CreateAnnouncement(event2.Id, "Announcement 2", "Content");
var announcement2 = TestDataFactory.CreateAnnouncement(event2.Id, "Announcement 2", "Content", organizer.Id);
announcement2.IsPublished = true;
_context.Announcements.AddRange(announcement1, announcement2);
await _context.SaveChangesAsync();