diff options
| author | Bond-009 <bond.009@outlook.com> | 2023-10-13 10:45:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-13 10:45:15 +0200 |
| commit | 4fc27fa63eb5a88a1a67a7ba67e969468f79a48d (patch) | |
| tree | 3275848551b4a2c5a844bdbd2d14f0697637b79e /tests/Jellyfin.Server.Integration.Tests/Controllers/ItemsControllerTests.cs | |
| parent | 5277339982f57c6e882db3313ee302667cce2ffb (diff) | |
| parent | d7748cfa0476280cce9dba34b4512cc58760c8bb (diff) | |
Merge pull request #10390 from Bond-009/streams
Diffstat (limited to 'tests/Jellyfin.Server.Integration.Tests/Controllers/ItemsControllerTests.cs')
| -rw-r--r-- | tests/Jellyfin.Server.Integration.Tests/Controllers/ItemsControllerTests.cs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/ItemsControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/ItemsControllerTests.cs index a12e7ca0d..23de2489e 100644 --- a/tests/Jellyfin.Server.Integration.Tests/Controllers/ItemsControllerTests.cs +++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/ItemsControllerTests.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; @@ -56,9 +57,7 @@ public sealed class ItemsControllerTests : IClassFixture<JellyfinApplicationFact var response = await client.GetAsync(string.Format(CultureInfo.InvariantCulture, format, userDto.Id)); Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var items = await JsonSerializer.DeserializeAsync<QueryResult<BaseItemDto>>( - await response.Content.ReadAsStreamAsync(), - _jsonOptions); + var items = await response.Content.ReadFromJsonAsync<QueryResult<BaseItemDto>>(_jsonOptions); Assert.NotNull(items); } } |
