Skip to content

Commit 7304c8b

Browse files
committed
Added tests
1 parent 8bef6a1 commit 7304c8b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/LinkDotNet.Blog.UnitTests/Web/Features/Components/ShortBlogPostTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,16 @@ public void GivenBlogPostThatIsNotPublishedAndNotScheduled_ThenIndicating()
8484

8585
cut.Find(".draft").Should().NotBeNull();
8686
}
87+
88+
[Fact]
89+
public void GivenBlogPostThatIsPublished_ThenNoDraft()
90+
{
91+
var blogPost = new BlogPostBuilder().IsPublished(true).Build();
92+
93+
var cut = RenderComponent<ShortBlogPost>(
94+
p => p.Add(c => c.BlogPost, blogPost));
95+
96+
cut.FindAll(".draft").Should().BeEmpty();
97+
cut.FindAll(".scheduled").Should().BeEmpty();
98+
}
8799
}

0 commit comments

Comments
 (0)