diff options
| author | Bond_009 <bond.009@outlook.com> | 2023-10-11 18:32:57 +0200 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2023-10-11 18:32:57 +0200 |
| commit | d7748cfa0476280cce9dba34b4512cc58760c8bb (patch) | |
| tree | 368389260833164e812cbb192989023c017cd755 /tests/Jellyfin.Server.Integration.Tests/Controllers/BrandingControllerTests.cs | |
| parent | 26571a8c51b9670f198e58175463e1d3db5441ee (diff) | |
Multiple Stream changes
* Remove useless MemoryStream in DlnaHttpClient
* Use HttpContent.ReadFromJsonAsync extension
* Call ConfigureAwait for IAsyncDisposable
* Use HttpContent.CopyToAsync where possible
Diffstat (limited to 'tests/Jellyfin.Server.Integration.Tests/Controllers/BrandingControllerTests.cs')
| -rw-r--r-- | tests/Jellyfin.Server.Integration.Tests/Controllers/BrandingControllerTests.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/BrandingControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/BrandingControllerTests.cs index 87136dfc8..8761cf69b 100644 --- a/tests/Jellyfin.Server.Integration.Tests/Controllers/BrandingControllerTests.cs +++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/BrandingControllerTests.cs @@ -1,4 +1,5 @@ using System.Net; +using System.Net.Http.Json; using System.Net.Mime; using System.Text; using System.Text.Json; @@ -30,8 +31,7 @@ namespace Jellyfin.Server.Integration.Tests Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Equal(MediaTypeNames.Application.Json, response.Content.Headers.ContentType?.MediaType); Assert.Equal(Encoding.UTF8.BodyName, response.Content.Headers.ContentType?.CharSet); - var responseBody = await response.Content.ReadAsStreamAsync(); - _ = await JsonSerializer.DeserializeAsync<BrandingOptions>(responseBody); + await response.Content.ReadFromJsonAsync<BrandingOptions>(); } [Theory] |
