aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs
diff options
context:
space:
mode:
authorMarc Brooks <IDisposable@gmail.com>2025-02-03 19:48:59 -0600
committerGitHub <noreply@github.com>2025-02-03 19:48:59 -0600
commite8cbcde02ebd930a5eeb6c95e0875a9e30acb3e8 (patch)
tree2ecd43f232012c8f037f4cd6fee4168e46d01aa3 /tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs
parent6dc61a430ba3a8480399309f277e5debfd6403ba (diff)
parentd376b5fbc7cf3ae7440a606a9e885d70605956bd (diff)
Merge branch 'master' into sort-nfo-data
Diffstat (limited to 'tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs')
-rw-r--r--tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs
index 4fcacd2ca..16c63ed49 100644
--- a/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs
+++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/UserControllerTests.cs
@@ -20,7 +20,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
private const string TestUsername = "testUser01";
private readonly JellyfinApplicationFactory _factory;
- private readonly JsonSerializerOptions _jsonOpions = JsonDefaults.Options;
+ private readonly JsonSerializerOptions _jsonOptions = JsonDefaults.Options;
private static string? _accessToken;
private static Guid _testUserId = Guid.Empty;
@@ -30,10 +30,10 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
}
private Task<HttpResponseMessage> CreateUserByName(HttpClient httpClient, CreateUserByName request)
- => httpClient.PostAsJsonAsync("Users/New", request, _jsonOpions);
+ => httpClient.PostAsJsonAsync("Users/New", request, _jsonOptions);
private Task<HttpResponseMessage> UpdateUserPassword(HttpClient httpClient, Guid userId, UpdateUserPassword request)
- => httpClient.PostAsJsonAsync("Users/" + userId.ToString("N", CultureInfo.InvariantCulture) + "/Password", request, _jsonOpions);
+ => httpClient.PostAsJsonAsync("Users/" + userId.ToString("N", CultureInfo.InvariantCulture) + "/Password", request, _jsonOptions);
[Fact]
[Priority(-1)]
@@ -43,7 +43,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
using var response = await client.GetAsync("Users/Public");
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
- var users = await response.Content.ReadFromJsonAsync<UserDto[]>(_jsonOpions);
+ var users = await response.Content.ReadFromJsonAsync<UserDto[]>(_jsonOptions);
// User are hidden by default
Assert.NotNull(users);
Assert.Empty(users);
@@ -58,7 +58,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
using var response = await client.GetAsync("Users");
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
- var users = await response.Content.ReadFromJsonAsync<UserDto[]>(_jsonOpions);
+ var users = await response.Content.ReadFromJsonAsync<UserDto[]>(_jsonOptions);
Assert.NotNull(users);
Assert.Single(users);
Assert.False(users![0].HasConfiguredPassword);
@@ -90,7 +90,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
using var response = await CreateUserByName(client, createRequest);
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
- var user = await response.Content.ReadFromJsonAsync<UserDto>(_jsonOpions);
+ var user = await response.Content.ReadFromJsonAsync<UserDto>(_jsonOptions);
Assert.Equal(TestUsername, user!.Name);
Assert.False(user.HasPassword);
Assert.False(user.HasConfiguredPassword);
@@ -151,7 +151,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
Assert.Equal(HttpStatusCode.NoContent, response.StatusCode);
var users = await JsonSerializer.DeserializeAsync<UserDto[]>(
- await client.GetStreamAsync("Users"), _jsonOpions);
+ await client.GetStreamAsync("Users"), _jsonOptions);
var user = users!.First(x => x.Id.Equals(_testUserId));
Assert.True(user.HasPassword);
Assert.True(user.HasConfiguredPassword);
@@ -174,7 +174,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
Assert.Equal(HttpStatusCode.NoContent, response.StatusCode);
var users = await JsonSerializer.DeserializeAsync<UserDto[]>(
- await client.GetStreamAsync("Users"), _jsonOpions);
+ await client.GetStreamAsync("Users"), _jsonOptions);
var user = users!.First(x => x.Id.Equals(_testUserId));
Assert.False(user.HasPassword);
Assert.False(user.HasConfiguredPassword);