-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -236,6 +236,18 @@ type MLBanTests(fixture: VahterTestContainers, _unused: MlAwaitFixture) = | |
let! msgBanned = fixture.MessageIsAutoDeleted msgUpdate.Message | ||
Assert.True msgBanned | ||
} | ||
|
||
[<Fact>] | ||
let ``Message which were edited triggers auto-delete`` () = task { | ||
// record a message, which originally was not a spam, | ||
// but it was edited to be a spam | ||
let msgUpdate = Tg.quickMsg(chat = fixture.ChatsToMonitor[0], text = "a", editedText = "2222222") | ||
let! _ = fixture.SendMessage msgUpdate | ||
|
||
// assert that the message got auto banned | ||
let! msgBanned = fixture.MessageIsAutoDeleted msgUpdate.Message | ||
Assert.True msgBanned | ||
Check failure on line 249 in src/VahterBanBot.Tests/MLBanTests.fs GitHub Actions / Test resultsVahterBanBot.Tests.MLBanTests+MLBanTests ► Message which were edited triggers auto-delete
Raw output
|
||
} | ||
|
||
interface IAssemblyFixture<VahterTestContainers> | ||
interface IClassFixture<MlAwaitFixture> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters