mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2024-09-19 12:18:48 -04:00
Clean up tests
This commit is contained in:
parent
4eab781450
commit
e7310274ba
2 changed files with 17 additions and 18 deletions
|
@ -2,7 +2,6 @@
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using AngleSharp.Dom;
|
using AngleSharp.Dom;
|
||||||
using DiscordChatExporter.Cli.Tests.Infra;
|
using DiscordChatExporter.Cli.Tests.Infra;
|
||||||
using DiscordChatExporter.Core.Discord;
|
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
|
@ -39,21 +38,4 @@ public class HtmlContentSpecs
|
||||||
"Yeet"
|
"Yeet"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public async Task Messages_cross_posted_from_other_guilds_are_rendered_with_the_server_tag()
|
|
||||||
{
|
|
||||||
// https://github.com/Tyrrrz/DiscordChatExporter/issues/633
|
|
||||||
|
|
||||||
// Act
|
|
||||||
var message = await ExportWrapper.GetMessageAsHtmlAsync(
|
|
||||||
ChannelIds.ReplyTestCases,
|
|
||||||
Snowflake.Parse("1072165330853576876")
|
|
||||||
);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
message.Text().Should().Contain("This is a test message from an announcement channel on another server");
|
|
||||||
message.Text().Should().Contain("SERVER");
|
|
||||||
message.QuerySelector(".chatlog__reply-link").Should().BeNull();
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -71,4 +71,21 @@ public class HtmlReplySpecs
|
||||||
// Assert
|
// Assert
|
||||||
message.Text().Should().Contain("used /poll");
|
message.Text().Should().Contain("used /poll");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task I_can_export_a_channel_that_contains_a_message_cross_posted_from_another_guild()
|
||||||
|
{
|
||||||
|
// https://github.com/Tyrrrz/DiscordChatExporter/issues/633
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var message = await ExportWrapper.GetMessageAsHtmlAsync(
|
||||||
|
ChannelIds.ReplyTestCases,
|
||||||
|
Snowflake.Parse("1072165330853576876")
|
||||||
|
);
|
||||||
|
|
||||||
|
// Assert
|
||||||
|
message.Text().Should().Contain("This is a test message from an announcement channel on another server");
|
||||||
|
message.Text().Should().Contain("SERVER");
|
||||||
|
message.QuerySelector(".chatlog__reply-link").Should().BeNull();
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue