Changes on packages
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
||||
<PackageReference Include="Newtonsoft.Json" />
|
||||
<PackageReference Include="NSubstitute" />
|
||||
<PackageReference Include="Testcontainers.PostgreSql" />
|
||||
<PackageReference Include="xunit.v3" />
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Musify.Application.Tests.Albums
|
||||
var stored = await Database.Albums.FindAsync([result.Value.Id], TestContext.Current.CancellationToken);
|
||||
Assert.NotNull(stored);
|
||||
Assert.Equal("MY ALBUM", stored.NormalizedTitle);
|
||||
Assert.Equal("cover.webp", stored.Pictures.OriginalName);
|
||||
Assert.Equal("cover.webp", stored.Pictures?.OriginalName);
|
||||
await eventBus.Received(1).PublishAsync(Arg.Any<Musify.Application.Events.CreateAlbumResourcesEvent>(), Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace Musify.Application.Tests.Albums
|
||||
Assert.False(result.IsError);
|
||||
var stored = await Database.Albums.FindAsync([album.Id], TestContext.Current.CancellationToken);
|
||||
Assert.NotNull(stored);
|
||||
Assert.Equal("new-cover.webp", stored.Pictures.OriginalName);
|
||||
Assert.Equal("new-cover.webp", stored.Pictures?.OriginalName);
|
||||
await eventBus.Received(1).PublishAsync(Arg.Any<Musify.Application.Events.UpdateAlbumPictureSourceEvent>(), Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ namespace Musify.Application.Tests.PlayLists
|
||||
Assert.False(result.IsError);
|
||||
var stored = await Database.PlayLists.FindAsync([result.Value.Id], TestContext.Current.CancellationToken);
|
||||
Assert.NotNull(stored);
|
||||
Assert.Equal("cover.webp", stored.Pictures.OriginalName);
|
||||
Assert.Equal("cover.webp", stored.Pictures?.OriginalName);
|
||||
await eventBus.Received(1).PublishAsync(Arg.Any<Musify.Application.Events.CreatePlayListResourcesEvent>(), Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
solution (and Musify.Infrastructure itself) is built against. -->
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
||||
<PackageReference Include="Newtonsoft.Json" />
|
||||
<PackageReference Include="NSubstitute" />
|
||||
<PackageReference Include="Testcontainers" />
|
||||
<PackageReference Include="Testcontainers.PostgreSql" />
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Musify.StreamingGateway.Tests.Authentication
|
||||
DateTime? expires = null, DateTime? notBefore = null, long? maxBytes = null)
|
||||
{
|
||||
var claims = new Dictionary<string, object> { ["prefix"] = prefix };
|
||||
if (maxBytes is not null)
|
||||
if (maxBytes != null)
|
||||
claims["maxBytes"] = maxBytes.Value.ToString();
|
||||
|
||||
var descriptor = new SecurityTokenDescriptor
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ namespace Musify.StreamingGateway.Tests.Middleware
|
||||
private string IssueValidToken(string prefix = Prefix, long? maxBytes = null)
|
||||
{
|
||||
var claims = new Dictionary<string, object> { ["prefix"] = prefix };
|
||||
if (maxBytes is not null)
|
||||
if (maxBytes != null)
|
||||
claims["maxBytes"] = maxBytes.Value.ToString();
|
||||
|
||||
return new JsonWebTokenHandler().CreateToken(new SecurityTokenDescriptor
|
||||
|
||||
Reference in New Issue
Block a user