Add support for Markdown with syntax highlighting

This commit is contained in:
Robert Marshall 2019-04-28 09:06:59 +01:00
parent 32eef104fb
commit 19818ef69e
5 changed files with 46 additions and 23 deletions

View file

@ -0,0 +1,22 @@
using FluentAssertions;
using NSubstitute;
using Website.Data.States;
using Website.Models;
using Website.ViewModels;
using Xunit;
namespace Website.Tests.VIewModels
{
public class BlogPostViewModelTests
{
[Fact]
public void Content_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>");
}
}
}