Add support for Markdown with syntax highlighting
This commit is contained in:
parent
32eef104fb
commit
19818ef69e
5 changed files with 46 additions and 23 deletions
22
Website.Tests/VIewModels/BlogPostViewModelTests.cs
Normal file
22
Website.Tests/VIewModels/BlogPostViewModelTests.cs
Normal 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>");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue