Final Friends Service Tests

This commit is contained in:
Artemy
2025-06-30 16:54:58 +07:00
parent 681a55c198
commit a659c73357
2 changed files with 87 additions and 2 deletions
+3 -2
View File
@@ -1,4 +1,3 @@
using Govor.Application.Exceptions;
using Govor.Application.Exceptions.FriendsService;
using Govor.Application.Interfaces;
using Govor.Core.Models;
@@ -110,7 +109,9 @@ public class FriendsService : IFriendsService
try
{
var user = await _usersRepository.FindByIdAsync(userId);
return user.ReceivedFriendRequests;
return user.ReceivedFriendRequests
.Where(f => f.Status == FriendshipStatus.Pending)
.ToList();
}
catch (NotFoundByKeyException<Guid> ex)
{