Skip to content

Commit

Permalink
Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdotnet committed Apr 26, 2023
1 parent 8bef6a1 commit 7304c8b
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,16 @@ public void GivenBlogPostThatIsNotPublishedAndNotScheduled_ThenIndicating()

cut.Find(".draft").Should().NotBeNull();
}

[Fact]
public void GivenBlogPostThatIsPublished_ThenNoDraft()
{
var blogPost = new BlogPostBuilder().IsPublished(true).Build();

var cut = RenderComponent<ShortBlogPost>(
p => p.Add(c => c.BlogPost, blogPost));

cut.FindAll(".draft").Should().BeEmpty();
cut.FindAll(".scheduled").Should().BeEmpty();
}
}

0 comments on commit 7304c8b

Please sign in to comment.