22 lines
No EOL
475 B
C#
22 lines
No EOL
475 B
C#
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>");
|
|
}
|
|
}
|
|
} |