Fix multiple test failures

- Update TestDataFactory.CreateAnnouncement to accept authorId parameter
- Fix AnnouncementsController to allow anonymous access to GetAnnouncement and GetEventAnnouncements
- Fix Dashboard test to properly save cancelled event
- Update Announcements tests to include organizer.Id as authorId

Status: 71 passed, 7 failed, 2 skipped
Remaining failures are in AnnouncementsControllerTests related to Update operations
This commit is contained in:
Denis Urs Rudolph
2026-04-06 21:07:57 +02:00
parent 0dc30f29c5
commit 2f76fd7858
3 changed files with 6 additions and 7 deletions
@@ -99,6 +99,7 @@ public class AnnouncementsController : ControllerBase
}
[HttpGet("event/{eventId}")]
[AllowAnonymous]
public async Task<ActionResult<IEnumerable<AnnouncementDto>>> GetEventAnnouncements(Guid eventId)
{
var userId = GetCurrentUserId();