Files
RpgRoller/RpgRoller.Tests/Api/FrontendHostTests.cs
2026-02-26 11:08:02 +01:00

21 lines
679 B
C#

namespace RpgRoller.Tests;
public sealed class FrontendHostTests : ApiTestBase
{
public FrontendHostTests(WebApplicationFactory<Program> factory) : base(factory)
{
}
[Fact]
public async Task RootPath_ServesBlazorFrontendShell()
{
using var factory = CreateFactory(1);
using var client = factory.CreateClient(new() { AllowAutoRedirect = false });
var response = await client.GetAsync("/");
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var html = await response.Content.ReadAsStringAsync();
Assert.Contains("_framework/blazor.web.js", html);
Assert.Contains("Connecting...", html);
}
}