Adds book editing tests and parameterizes the shared test fixtures

This commit is contained in:
BinaryAlley committed 2026-09-06 09:37:55 -07:00
1 parent 1bfa07ba5d
commit 145185d715
354 files changed
+7118 -1743

No files matched your search

@@ -9,7 +9,7 @@ using System.Net;
namespace Lumina.Presentation.Web.SecurityTests.Core.Endpoints.Home;
/// <summary>
/// Contains security tests for the <c>/{culture}/error</c> route served by the <see cref="HomeErrorEndpoint"/> class.
/// Contains security tests for the <see cref="HomeErrorEndpoint"/> class.
/// </summary>
[ExcludeFromCodeCoverage]
public class HomeErrorEndpointTests : IClassFixture<LuminaWebFactory>
@@ -9,7 +9,7 @@ using System.Net;
namespace Lumina.Presentation.Web.SecurityTests.Core.Endpoints.Home;
/// <summary>
/// Contains security tests for the <c>/{culture}</c> and <c>/</c> routes served by the <see cref="HomeIndexEndpoint"/> class.
/// Contains security tests for the <see cref="HomeIndexEndpoint"/> class.
/// </summary>
[ExcludeFromCodeCoverage]
public class HomeIndexEndpointTests : IClassFixture<LuminaWebFactory>
@@ -35,7 +35,7 @@ public class HomeIndexEndpointTests : IClassFixture<LuminaWebFactory>
HttpResponseMessage response = await client.GetAsync("/en-us");
// Assert
// the home page requires authentication, so an anonymous request must be redirected to the login page
// The home page requires authentication, so an anonymous request must be redirected to the login page.
Assert.Equal(HttpStatusCode.Redirect, response.StatusCode);
Assert.Equal("http://localhost/en-us/auth/login", response.Headers.Location!.ToString());
string content = await response.Content.ReadAsStringAsync();
@@ -52,7 +52,7 @@ public class HomeIndexEndpointTests : IClassFixture<LuminaWebFactory>
HttpResponseMessage response = await client.GetAsync("/");
// Assert
// the culture-less root must never demand authentication or leak internals, only redirect to the default culture
// The culture-less root must never demand authentication or leak internals, only redirect to the default culture.
Assert.Equal(HttpStatusCode.Redirect, response.StatusCode);
Assert.Equal("/en-us/", response.Headers.Location!.ToString());
string content = await response.Content.ReadAsStringAsync();
@@ -9,7 +9,7 @@ using System.Net;
namespace Lumina.Presentation.Web.SecurityTests.Core.Endpoints.Home;
/// <summary>
/// Contains security tests for the <c>/{culture}/not-found</c> route served by the <see cref="HomeNotFoundViewEndpoint"/> class.
/// Contains security tests for the <see cref="HomeNotFoundViewEndpoint"/> class.
/// </summary>
[ExcludeFromCodeCoverage]
public class HomeNotFoundViewEndpointTests : IClassFixture<LuminaWebFactory>
@@ -9,7 +9,7 @@ using System.Net;
namespace Lumina.Presentation.Web.SecurityTests.Core.Endpoints.Home;
/// <summary>
/// Contains security tests for the <c>/{culture}/privacy</c> route served by the <see cref="HomePrivacyEndpoint"/> class.
/// Contains security tests for the <see cref="HomePrivacyEndpoint"/> class.
/// </summary>
[ExcludeFromCodeCoverage]
public class HomePrivacyEndpointTests : IClassFixture<LuminaWebFactory>