using PrivaPub.Api.Mastodon.Mappers; using PrivaPub.Models.Post; namespace PrivaPub.Tests.Api { public class StatusContentTests { [Fact] public void A_remote_article_shows_its_title_above_its_body() => Assert.Equal("

Rain & sun

body

", MastodonMapper.Content(new Post { IsFederatedCopy = true, ObjectType = "Article", Title = "Rain & sun", ContentHtml = "

body

" })); [Fact] public void A_remote_note_keeps_its_content_alone() => Assert.Equal("

body

", MastodonMapper.Content(new Post { IsFederatedCopy = true, ObjectType = "Note", Title = "a poll choice", ContentHtml = "

body

" })); [Fact] public void A_remote_event_without_a_body_shows_its_excerpt() => Assert.Equal("

Meetup

Saturday <10:00>

", MastodonMapper.Content(new Post { IsFederatedCopy = true, ObjectType = "Event", Title = "Meetup", Excerpt = "Saturday <10:00>", ContentHtml = string.Empty })); } }