X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/80e348724041a694002fc38f57e8868b9b9a2be9..c781f79f3c8cb9a7577ee1574d196988da2719b3:/telegram_test.go?ds=inline diff --git a/telegram_test.go b/telegram_test.go index dee692d..8d033ab 100644 --- a/telegram_test.go +++ b/telegram_test.go @@ -192,11 +192,13 @@ func TestBotSkipsTheWorkOfWhatsAppAndTheSchedules(t *testing.T) { 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) } @@ -646,6 +648,7 @@ func TestBotLogsNoTokenWhenTheNetworkFails(t *testing.T) { require.Eventually(t, func() bool { return strings.Contains(logs.String(), "<4>receive failed retry=1s: no answer: ") }, 10*time.Second, time.Millisecond) + require.NotContains(t, logs.String(), telegramTestToken) } @@ -694,6 +697,7 @@ func TestBotLogsAnOutageOnlyAtItsStartAndEnd(t *testing.T) { "<4>receive failed retry=1s: 502 Bad Gateway", "<6>receive back after=31s", }, lines) + require.NotContains(t, logs.String(), "secret word") require.NotContains(t, logs.String(), strconv.FormatInt(telegramTestOwner, 10)) cancel()