X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/8d9547f6e7ffa1e95ad25d9f8f2e7cfd23d992d0..7088b82414bdf947a6f88918c0a7b2c7fb0c53ef:/whatsapp_test.go?ds=inline diff --git a/whatsapp_test.go b/whatsapp_test.go index 5c38d59..7001ea1 100644 --- a/whatsapp_test.go +++ b/whatsapp_test.go @@ -43,7 +43,7 @@ func TestWhatsAppStatusOfAFirstConnectionThatFailed(t *testing.T) { <-fake.connects require.True(t, fake.Emit(&events.Disconnected{})) require.Equal(t, "WhatsApp is linked and disconnected since 2026-01-01 12:00.", whatsapp.Status()) - require.Equal(t, "new WhatsApp messages wait, because the first connection failed (the next try is automatic)\n", logs.String()) + require.Equal(t, "first connect failed, retrying\n", logs.String()) } func TestWhatsAppLogsEachChangeOfTheConnectionOnce(t *testing.T) { @@ -63,9 +63,9 @@ func TestWhatsAppLogsEachChangeOfTheConnectionOnce(t *testing.T) { require.True(t, fake.Emit(&events.Connected{})) require.Equal(t, []string{ - "WhatsApp is connected, and new messages come in", - "new WhatsApp messages wait, because the connection is lost (the next try is automatic)", - "WhatsApp is connected again, after 1m25s", + "connected", + "disconnected, retrying", + "connected again after 1m25s", }, strings.Split(strings.TrimSuffix(logs.String(), "\n"), "\n")) require.NotContains(t, logs.String(), whatsappTestNumber) require.NotContains(t, logs.String(), whatsappTestLID) @@ -396,7 +396,7 @@ func TestWhatsAppLogsNoOwnNumber(t *testing.T) { require.Eventually(t, func() bool { return logs.String() != "" }, 10*time.Second, time.Millisecond) - require.Equal(t, "WhatsApp messages do not come, because the connection failed, and it is tried again only at a restart of the daemon: no route for OWN@s.whatsapp.net and OWN@lid\n", logs.String()) + require.Equal(t, "connect failed, restart to retry: no route for OWN@s.whatsapp.net and OWN@lid\n", logs.String()) } func TestWhatsAppPhone(t *testing.T) {