mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 17:44:43 +01:00
Fix build errors from new warnings
This commit is contained in:
@@ -83,6 +83,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
|
||||
|
||||
var res = await response.Content.ReadAsStreamAsync();
|
||||
var data = await JsonSerializer.DeserializeAsync<ConfigurationPageInfo[]>(res, _jsonOpions);
|
||||
Assert.NotNull(data);
|
||||
Assert.Empty(data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,9 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
|
||||
|
||||
using var contentStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
|
||||
var user = await JsonSerializer.DeserializeAsync<StartupUserDto>(contentStream, _jsonOptions).ConfigureAwait(false);
|
||||
Assert.NotEmpty(user!.Name);
|
||||
Assert.NotNull(user);
|
||||
Assert.NotNull(user.Name);
|
||||
Assert.NotEmpty(user.Name);
|
||||
Assert.Null(user.Password);
|
||||
}
|
||||
|
||||
@@ -87,7 +89,9 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
|
||||
|
||||
var contentStream = await getResponse.Content.ReadAsStreamAsync().ConfigureAwait(false);
|
||||
var newUser = await JsonSerializer.DeserializeAsync<StartupUserDto>(contentStream, _jsonOptions).ConfigureAwait(false);
|
||||
Assert.Equal(user.Name, newUser!.Name);
|
||||
Assert.NotNull(newUser);
|
||||
Assert.Equal(user.Name, newUser.Name);
|
||||
Assert.NotNull(newUser.Password);
|
||||
Assert.NotEmpty(newUser.Password);
|
||||
Assert.NotEqual(user.Password, newUser.Password);
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
|
||||
var users = await JsonSerializer.DeserializeAsync<UserDto[]>(
|
||||
await response.Content.ReadAsStreamAsync().ConfigureAwait(false), _jsonOpions).ConfigureAwait(false);
|
||||
// User are hidden by default
|
||||
Assert.NotNull(users);
|
||||
Assert.Empty(users);
|
||||
}
|
||||
|
||||
@@ -60,6 +61,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
|
||||
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
|
||||
var users = await JsonSerializer.DeserializeAsync<UserDto[]>(
|
||||
await response.Content.ReadAsStreamAsync().ConfigureAwait(false), _jsonOpions).ConfigureAwait(false);
|
||||
Assert.NotNull(users);
|
||||
Assert.Single(users);
|
||||
Assert.False(users![0].HasConfiguredPassword);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user