25 lines
662 B
C#
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);
|
|
}
|
|
}
|