aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2021-12-01 15:58:23 +0100
committerBond_009 <bond.009@outlook.com>2021-12-01 15:58:23 +0100
commit40be86eec0fa7f43b64d05f30adcfab88ad3c402 (patch)
tree35fef4b8f6db6c0df9a91ed5059150bfabb85d3d /tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs
parentbeafd6eaabf7baa7c478b4a0ef131ddc480b368a (diff)
Use PostAsJsonAsync where possible
Diffstat (limited to 'tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs')
-rw-r--r--tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs10
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs
index 0f8b930f1..f11f276f8 100644
--- a/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs
+++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs
@@ -32,16 +32,10 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
}
private Task<HttpResponseMessage> CreateUserByName(HttpClient httpClient, CreateUserByName request)
- {
- using var postContent = JsonContent.Create(request, options: _jsonOpions);
- return httpClient.PostAsync("Users/New", postContent);
- }
+ => httpClient.PostAsJsonAsync("Users/New", request, _jsonOpions);
private Task<HttpResponseMessage> UpdateUserPassword(HttpClient httpClient, Guid userId, UpdateUserPassword request)
- {
- using var postContent = JsonContent.Create(request, options: _jsonOpions);
- return httpClient.PostAsync("Users/" + userId.ToString("N", CultureInfo.InvariantCulture) + "/Password", postContent);
- }
+ => httpClient.PostAsJsonAsync("Users/" + userId.ToString("N", CultureInfo.InvariantCulture) + "/Password", request, _jsonOpions);
[Fact]
[Priority(-1)]