X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/c781f79f3c8cb9a7577ee1574d196988da2719b3..98d137c3e945a09f76e85bd18238558c668fdca4:/telegram_test.go?ds=inline diff --git a/telegram_test.go b/telegram_test.go index 8d033ab..17bea09 100644 --- a/telegram_test.go +++ b/telegram_test.go @@ -182,7 +182,7 @@ func TestBotShowsOnlyTheStartAndTheEndOfASubagent(t *testing.T) { }, sent) } -func TestBotSkipsTheWorkOfWhatsAppAndTheSchedules(t *testing.T) { +func TestBotSkipsExternalWorkAndSchedules(t *testing.T) { bot := &TelegramBot{ ready: make(chan struct{}, 1), } @@ -199,6 +199,12 @@ func TestBotSkipsTheWorkOfWhatsAppAndTheSchedules(t *testing.T) { Text: "[Schedule 1] Sunday 2026-11-08 20:05 -03:00, once", }) + bot.Notify(Event{ + Kind: "work", + Source: notifySource, + Text: "Untrusted external data.", + }) + require.Empty(t, bot.queue) }