aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs
diff options
context:
space:
mode:
authorherby2212 <12448284+herby2212@users.noreply.github.com>2023-10-21 01:20:59 +0200
committerherby2212 <12448284+herby2212@users.noreply.github.com>2023-10-21 01:20:59 +0200
commit27ceee8b6c70570129b917d8467a3a5bb058eab4 (patch)
tree49309bf28c40f19a2cdc96a3ac051e88f30f14b1 /tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs
parente8a05ad996ab35909cd5928d49c4e8c46e9985d5 (diff)
parentdf7032b09e720cf07169514433557edf22922d0c (diff)
update to current master to resolve merge conflict
Diffstat (limited to 'tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs')
-rw-r--r--tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs13
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs
index 826a0a69d..130281c6d 100644
--- a/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs
+++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/UserLibraryControllerTests.cs
@@ -1,6 +1,7 @@
using System;
using System.Globalization;
using System.Net;
+using System.Net.Http.Json;
using System.Text.Json;
using System.Threading.Tasks;
using Jellyfin.Extensions.Json;
@@ -85,9 +86,7 @@ public sealed class UserLibraryControllerTests : IClassFixture<JellyfinApplicati
var response = await client.GetAsync($"Users/{userDto.Id}/Items/{rootFolderDto.Id}");
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
- var rootDto = await JsonSerializer.DeserializeAsync<BaseItemDto>(
- await response.Content.ReadAsStreamAsync(),
- _jsonOptions);
+ var rootDto = await response.Content.ReadFromJsonAsync<BaseItemDto>(_jsonOptions);
Assert.NotNull(rootDto);
}
@@ -102,9 +101,7 @@ public sealed class UserLibraryControllerTests : IClassFixture<JellyfinApplicati
var response = await client.GetAsync($"Users/{userDto.Id}/Items/{rootFolderDto.Id}/Intros");
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
- var rootDto = await JsonSerializer.DeserializeAsync<QueryResult<BaseItemDto>>(
- await response.Content.ReadAsStreamAsync(),
- _jsonOptions);
+ var rootDto = await response.Content.ReadFromJsonAsync<QueryResult<BaseItemDto>>(_jsonOptions);
Assert.NotNull(rootDto);
}
@@ -121,9 +118,7 @@ public sealed class UserLibraryControllerTests : IClassFixture<JellyfinApplicati
var response = await client.GetAsync(string.Format(CultureInfo.InvariantCulture, format, userDto.Id, rootFolderDto.Id));
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
- var rootDto = await JsonSerializer.DeserializeAsync<BaseItemDto[]>(
- await response.Content.ReadAsStreamAsync(),
- _jsonOptions);
+ var rootDto = await response.Content.ReadFromJsonAsync<BaseItemDto[]>(_jsonOptions);
Assert.NotNull(rootDto);
}
}