diff options
| author | Stepan Goremykin <goremukin@gmail.com> | 2023-10-14 00:45:52 +0200 |
|---|---|---|
| committer | Stepan Goremykin <goremukin@gmail.com> | 2023-10-14 00:45:52 +0200 |
| commit | 38d962242ad0b4d3cf10b175836bf1e5e9b60d39 (patch) | |
| tree | aa0c164036ea9e628f38fa14a3d29635f7ffd042 /tests/Jellyfin.Server.Integration.Tests/AuthHelper.cs | |
| parent | a773b43a814e6e849bbb5eb0fa1bccf09a4c1945 (diff) | |
| parent | 4fc27fa63eb5a88a1a67a7ba67e969468f79a48d (diff) | |
Merge branch 'master' into fix-resharper-warnings
# Conflicts:
# Emby.Server.Implementations/Updates/InstallationManager.cs
# tests/Jellyfin.Server.Integration.Tests/OpenApiSpecTests.cs
Diffstat (limited to 'tests/Jellyfin.Server.Integration.Tests/AuthHelper.cs')
| -rw-r--r-- | tests/Jellyfin.Server.Integration.Tests/AuthHelper.cs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/Jellyfin.Server.Integration.Tests/AuthHelper.cs b/tests/Jellyfin.Server.Integration.Tests/AuthHelper.cs index 5ddbd30d1..4e8aec9f1 100644 --- a/tests/Jellyfin.Server.Integration.Tests/AuthHelper.cs +++ b/tests/Jellyfin.Server.Integration.Tests/AuthHelper.cs @@ -40,9 +40,7 @@ namespace Jellyfin.Server.Integration.Tests using var authResponse = await client.SendAsync(httpRequest); authResponse.EnsureSuccessStatusCode(); - var auth = await JsonSerializer.DeserializeAsync<AuthenticationResultDto>( - await authResponse.Content.ReadAsStreamAsync(), - jsonOptions); + var auth = await authResponse.Content.ReadFromJsonAsync<AuthenticationResultDto>(jsonOptions); return auth!.AccessToken; } @@ -51,8 +49,7 @@ namespace Jellyfin.Server.Integration.Tests { using var response = await client.GetAsync("Users/Me"); Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var userDto = await JsonSerializer.DeserializeAsync<UserDto>( - await response.Content.ReadAsStreamAsync(), JsonDefaults.Options); + var userDto = await response.Content.ReadFromJsonAsync<UserDto>(JsonDefaults.Options); Assert.NotNull(userDto); return userDto; } @@ -67,9 +64,7 @@ namespace Jellyfin.Server.Integration.Tests var response = await client.GetAsync($"Users/{userId}/Items/Root"); Assert.Equal(HttpStatusCode.OK, response.StatusCode); - var rootDto = await JsonSerializer.DeserializeAsync<BaseItemDto>( - await response.Content.ReadAsStreamAsync(), - JsonDefaults.Options); + var rootDto = await response.Content.ReadFromJsonAsync<BaseItemDto>(JsonDefaults.Options); Assert.NotNull(rootDto); return rootDto; } |
