mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Fix test
This commit is contained in:
parent
69ba539c70
commit
0f7c875076
@ -7,6 +7,7 @@ using System.Text.Json;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Jellyfin.Api.Models.LibraryStructureDto;
|
using Jellyfin.Api.Models.LibraryStructureDto;
|
||||||
using Jellyfin.Extensions.Json;
|
using Jellyfin.Extensions.Json;
|
||||||
|
using MediaBrowser.Model.Configuration;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Jellyfin.Server.Integration.Tests.Controllers
|
namespace Jellyfin.Server.Integration.Tests.Controllers
|
||||||
@ -78,14 +79,18 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task UpdateMediaPath_EmptyName_ReturnsBadRequest()
|
public async Task UpdateMediaPath_WhiteSpaceName_ReturnsBadRequest()
|
||||||
{
|
{
|
||||||
var client = _factory.CreateClient();
|
var client = _factory.CreateClient();
|
||||||
client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client).ConfigureAwait(false));
|
client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client).ConfigureAwait(false));
|
||||||
|
|
||||||
var data = new UpdateMediaPathRequestDto()
|
var data = new UpdateMediaPathRequestDto()
|
||||||
{
|
{
|
||||||
Name = string.Empty,
|
Name = " ",
|
||||||
|
PathInfo = new MediaPathInfo
|
||||||
|
{
|
||||||
|
Path = "test"
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
using var postContent = new ByteArrayContent(JsonSerializer.SerializeToUtf8Bytes(data, _jsonOptions));
|
using var postContent = new ByteArrayContent(JsonSerializer.SerializeToUtf8Bytes(data, _jsonOptions));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user