Files
blog.stevanfreeborn.com/test/Blog.Tests/Unit/Footer.spec.razor
T

24 lines
538 B
Plaintext
Raw Normal View History

@inherits Bunit.BunitContext
2024-04-13 19:30:57 -05:00
@code
{
2024-04-13 19:30:57 -05:00
[Test]
public void Footer_WhenRendered_ItShouldRenderFooterWithNavLinks()
{
var ctx = new BunitContext();
2024-04-13 19:30:57 -05:00
var cut = ctx.Render(@<Footer />);
var footer = cut.Find("footer");
footer.Should().NotBeNull();
var navLinks = cut.FindAll("a");
navLinks.Count.Should().Be(3);
var navLinkTexts = navLinks.Select(x => x.TextContent);
navLinkTexts.Should().Contain("Code");
navLinkTexts.Should().Contain("Terms");
navLinkTexts.Should().Contain("Privacy");
}
}