Fix issue with blog preview when content under 1000 chars.

This commit is contained in:
Robert Marshall 2019-08-26 15:04:32 +01:00
parent 3a8aedd653
commit 0f64014b30
6 changed files with 38 additions and 10 deletions

View file

@ -10,13 +10,13 @@ namespace Website.Tests.VIewModels
public class BlogPostViewModelTests
{
[Fact]
public void Content_WithMarkdownContent_ReturnsHtml() {
public void ContentHtml_WithMarkdownContent_ReturnsHtml() {
var state = new BlogPostState {
Post_Content="# header"
};
var post = new BlogPost(state);
var vm = new BlogPostViewModel(post);
vm.Content.Should().Be("<h1>header</h1>");
vm.ContentHtml.Should().Be("<h1>header</h1>");
}
[Fact]