X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/eeb821ff17ad79c87ca9b64cd9be26f8612f4a03..2501e78d10204fac2298db0dee84b3dce379e09b:/telegram_test.go?ds=inline diff --git a/telegram_test.go b/telegram_test.go index 5e50ec1..66a5f47 100644 --- a/telegram_test.go +++ b/telegram_test.go @@ -179,6 +179,24 @@ func TestBotShowsOnlyTheStartAndTheEndOfASubagent(t *testing.T) { }, sent) } +func TestBotSkipsTheWorkOfWhatsAppAndTheSchedules(t *testing.T) { + bot := &TelegramBot{ + ready: make(chan struct{}, 1), + } + + bot.Notify(Event{ + Kind: "work", + Source: whatsappSource, + Text: "[WhatsApp] Ana Souza", + }) + bot.Notify(Event{ + Kind: "work", + Source: scheduleSource, + Text: "[Schedule 1] Sunday 2026-11-08 20:05 -03:00, once", + }) + require.Empty(t, bot.queue) +} + func TestBotStartsAtTheStoredOffset(t *testing.T) { server := newModelFake(t) server.reply = func(w http.ResponseWriter, call ModelFakeCall) {