Added tests

This commit is contained in:
2026-05-29 13:49:44 +02:00
parent 10124f0184
commit af2cf03fb4
29 changed files with 2212 additions and 6 deletions
@@ -14,10 +14,13 @@ namespace Musify.Application.PlayLists.Handlers
{
var playList = await database.PlayLists
.AsNoTracking()
.Where(p => p.Id == request.Id)
.Select(p => PlayListApplicationResponse.FromEntity(p))
.SingleOrDefaultAsync(p => p.Id == request.Id, cancellationToken);
.SingleOrDefaultAsync(cancellationToken);
return playList ?? Result<PlayListApplicationResponse>.NotFound();
return playList is null
? Result<PlayListApplicationResponse>.NotFound()
: Result.Success(playList);
}
}
}