Bifrost/tests/Bifrost.Web.Tests/HomePageTests.cs
2026-04-21 20:08:49 +01:00

25 lines
662 B
C#

using System.Net;
using Bifrost.Web.Tests.Support;
namespace Bifrost.Web.Tests;
public sealed class HomePageTests : IClassFixture<TestWebApplicationFactory>
{
private readonly TestWebApplicationFactory _factory;
public HomePageTests(TestWebApplicationFactory factory)
{
_factory = factory;
}
[Fact]
public async Task Home_page_loads()
{
using var client = _factory.CreateClient();
using var response = await client.GetAsync("/");
Assert.Equal(HttpStatusCode.OK, response.StatusCode);
var html = await response.Content.ReadAsStringAsync();
Assert.Contains("Bifrost", html);
}
}