mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
chore: fix spelling
* a * acceleration * addition * altogether * api clients * artist * associated * bandwidth * cannot * capabilities * case-insensitive * case-sensitive * configuration * delimiter * dependent * diacritics * directors * enable * explicitly * filters * finish * have * hierarchy * implicit * include * information * into * its * keepalive * localization * macos * manual * matching * metadata * nonexistent * options * overridden * parsed * parser * playback * preferring * processes * processing * provider * ratings * retrieval * running * segments * separate * should * station * subdirectories * superseded * supported * system * than * the * throws * transpose * valid * was link: forum or chat rooms Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
|
||||
public sealed class DashboardControllerTests : IClassFixture<JellyfinApplicationFactory>
|
||||
{
|
||||
private readonly JellyfinApplicationFactory _factory;
|
||||
private readonly JsonSerializerOptions _jsonOpions = JsonDefaults.Options;
|
||||
private readonly JsonSerializerOptions _jsonOptions = JsonDefaults.Options;
|
||||
private static string? _accessToken;
|
||||
|
||||
public DashboardControllerTests(JellyfinApplicationFactory factory)
|
||||
@@ -65,7 +65,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
|
||||
|
||||
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
|
||||
|
||||
_ = await response.Content.ReadFromJsonAsync<ConfigurationPageInfo[]>(_jsonOpions);
|
||||
_ = await response.Content.ReadFromJsonAsync<ConfigurationPageInfo[]>(_jsonOptions);
|
||||
// TODO: check content
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
|
||||
Assert.Equal(MediaTypeNames.Application.Json, response.Content.Headers.ContentType?.MediaType);
|
||||
Assert.Equal(Encoding.UTF8.BodyName, response.Content.Headers.ContentType?.CharSet);
|
||||
|
||||
var data = await response.Content.ReadFromJsonAsync<ConfigurationPageInfo[]>(_jsonOpions);
|
||||
var data = await response.Content.ReadFromJsonAsync<ConfigurationPageInfo[]>(_jsonOptions);
|
||||
Assert.NotNull(data);
|
||||
Assert.Empty(data);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public sealed class ItemsControllerTests : IClassFixture<JellyfinApplicationFact
|
||||
[Theory]
|
||||
[InlineData("Users/{0}/Items")]
|
||||
[InlineData("Users/{0}/Items/Resume")]
|
||||
public async Task GetUserItems_NonExistentUserId_NotFound(string format)
|
||||
public async Task GetUserItems_NonexistentUserId_NotFound(string format)
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client));
|
||||
|
||||
@@ -29,7 +29,7 @@ public sealed class LibraryControllerTests : IClassFixture<JellyfinApplicationFa
|
||||
[InlineData("Shows/{0}/Similar")]
|
||||
[InlineData("Movies/{0}/Similar")]
|
||||
[InlineData("Trailers/{0}/Similar")]
|
||||
public async Task Get_NonExistentItemId_NotFound(string format)
|
||||
public async Task Get_NonexistentItemId_NotFound(string format)
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client));
|
||||
@@ -41,7 +41,7 @@ public sealed class LibraryControllerTests : IClassFixture<JellyfinApplicationFa
|
||||
[Theory]
|
||||
[InlineData("Items/{0}")]
|
||||
[InlineData("Items?ids={0}")]
|
||||
public async Task Delete_NonExistentItemId_Unauthorised(string format)
|
||||
public async Task Delete_NonexistentItemId_Unauthorised(string format)
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
|
||||
@@ -52,7 +52,7 @@ public sealed class LibraryControllerTests : IClassFixture<JellyfinApplicationFa
|
||||
[Theory]
|
||||
[InlineData("Items/{0}")]
|
||||
[InlineData("Items?ids={0}")]
|
||||
public async Task Delete_NonExistentItemId_NotFound(string format)
|
||||
public async Task Delete_NonexistentItemId_NotFound(string format)
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client));
|
||||
|
||||
@@ -16,7 +16,7 @@ public class PlaystateControllerTests : IClassFixture<JellyfinApplicationFactory
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task DeleteMarkUnplayedItem_NonExistentUserId_NotFound()
|
||||
public async Task DeleteMarkUnplayedItem_NonexistentUserId_NotFound()
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client));
|
||||
@@ -26,7 +26,7 @@ public class PlaystateControllerTests : IClassFixture<JellyfinApplicationFactory
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task PostMarkPlayedItem_NonExistentUserId_NotFound()
|
||||
public async Task PostMarkPlayedItem_NonexistentUserId_NotFound()
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client));
|
||||
@@ -36,7 +36,7 @@ public class PlaystateControllerTests : IClassFixture<JellyfinApplicationFactory
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task DeleteMarkUnplayedItem_NonExistentItemId_NotFound()
|
||||
public async Task DeleteMarkUnplayedItem_NonexistentItemId_NotFound()
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client));
|
||||
@@ -48,7 +48,7 @@ public class PlaystateControllerTests : IClassFixture<JellyfinApplicationFactory
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task PostMarkPlayedItem_NonExistentItemId_NotFound()
|
||||
public async Task PostMarkPlayedItem_NonexistentItemId_NotFound()
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client));
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -23,7 +23,7 @@ public sealed class UserLibraryControllerTests : IClassFixture<JellyfinApplicati
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetRootFolder_NonExistenUserId_NotFound()
|
||||
public async Task GetRootFolder_NonexistentUserId_NotFound()
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client));
|
||||
@@ -47,7 +47,7 @@ public sealed class UserLibraryControllerTests : IClassFixture<JellyfinApplicati
|
||||
[InlineData("Users/{0}/Items/{1}/LocalTrailers")]
|
||||
[InlineData("Users/{0}/Items/{1}/SpecialFeatures")]
|
||||
[InlineData("Users/{0}/Items/{1}/Lyrics")]
|
||||
public async Task GetItem_NonExistenUserId_NotFound(string format)
|
||||
public async Task GetItem_NonexistentUserId_NotFound(string format)
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client));
|
||||
@@ -64,7 +64,7 @@ public sealed class UserLibraryControllerTests : IClassFixture<JellyfinApplicati
|
||||
[InlineData("Users/{0}/Items/{1}/LocalTrailers")]
|
||||
[InlineData("Users/{0}/Items/{1}/SpecialFeatures")]
|
||||
[InlineData("Users/{0}/Items/{1}/Lyrics")]
|
||||
public async Task GetItem_NonExistentItemId_NotFound(string format)
|
||||
public async Task GetItem_NonexistentItemId_NotFound(string format)
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client));
|
||||
|
||||
@@ -16,7 +16,7 @@ public sealed class VideosControllerTests : IClassFixture<JellyfinApplicationFac
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task DeleteAlternateSources_NonExistentItemId_NotFound()
|
||||
public async Task DeleteAlternateSources_NonexistentItemId_NotFound()
|
||||
{
|
||||
var client = _factory.CreateClient();
|
||||
client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client));
|
||||
|
||||
Reference in New Issue
Block a user