diff --git a/LeaderboardBackend.Test/Leaderboards.cs b/LeaderboardBackend.Test/Leaderboards.cs index aa50652e..69d1a761 100644 --- a/LeaderboardBackend.Test/Leaderboards.cs +++ b/LeaderboardBackend.Test/Leaderboards.cs @@ -618,10 +618,17 @@ public async Task DeleteLeaderboard_AlreadyDeleted() context.Leaderboards.Add(lb); await context.SaveChangesAsync(); - await FluentActions.Awaiting(() => _apiClient.Delete( + ExceptionAssertions ex = await FluentActions.Awaiting(() => _apiClient.Delete( $"/leaderboard/{lb.Id}", new() { Jwt = _jwt } )).Should().ThrowAsync().Where(e => e.Response.StatusCode == HttpStatusCode.NotFound); + + ProblemDetails? problemDetails = await ex.Which.Response.Content.ReadFromJsonAsync( + TestInitCommonFields.JsonSerializerOptions + ); + + problemDetails.Should().NotBeNull(); + problemDetails!.Title.Should().Be("Already Deleted"); } [Test]