diff --git a/DiscordChatExporter.Cli.Tests/Specs/FilterSpecs.cs b/DiscordChatExporter.Cli.Tests/Specs/FilterSpecs.cs index 023b7bf6..8393ada0 100644 --- a/DiscordChatExporter.Cli.Tests/Specs/FilterSpecs.cs +++ b/DiscordChatExporter.Cli.Tests/Specs/FilterSpecs.cs @@ -90,31 +90,6 @@ public class FilterSpecs .AllBe("This has image"); } - [Fact] - public async Task I_can_filter_the_export_to_only_include_messages_that_contain_guild_invites() - { - // Arrange - using var file = TempFile.Create(); - - // Act - await new ExportChannelsCommand - { - Token = Secrets.DiscordToken, - ChannelIds = [ChannelIds.FilterTestCases], - ExportFormat = ExportFormat.Json, - OutputPath = file.Path, - MessageFilter = MessageFilter.Parse("has:invite") - }.ExecuteAsync(new FakeConsole()); - - // Assert - Json.Parse(await File.ReadAllTextAsync(file.Path)) - .GetProperty("messages") - .EnumerateArray() - .Select(j => j.GetProperty("content").GetString()) - .Should() - .AllBe("This has invite"); - } - [Fact] public async Task I_can_filter_the_export_to_only_include_messages_that_have_been_pinned() { @@ -140,6 +115,31 @@ public class FilterSpecs .AllBe("This is pinned"); } + [Fact] + public async Task I_can_filter_the_export_to_only_include_messages_that_contain_guild_invites() + { + // Arrange + using var file = TempFile.Create(); + + // Act + await new ExportChannelsCommand + { + Token = Secrets.DiscordToken, + ChannelIds = [ChannelIds.FilterTestCases], + ExportFormat = ExportFormat.Json, + OutputPath = file.Path, + MessageFilter = MessageFilter.Parse("has:invite") + }.ExecuteAsync(new FakeConsole()); + + // Assert + Json.Parse(await File.ReadAllTextAsync(file.Path)) + .GetProperty("messages") + .EnumerateArray() + .Select(j => j.GetProperty("content").GetString()) + .Should() + .AllBe("This has invite"); + } + [Fact] public async Task I_can_filter_the_export_to_only_include_messages_that_contain_the_specified_mention() {