X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/959c24478e2c3a596a81cca359fd784c897f46a2..bd7da3557dc7a17020931f5a49ed5007fa81a645:/daemon_message_test.go?ds=inline diff --git a/daemon_message_test.go b/daemon_message_test.go index 3cca09f..a7792e8 100644 --- a/daemon_message_test.go +++ b/daemon_message_test.go @@ -664,6 +664,7 @@ func TestMissingWhatsAppRouteChildFallsBackToRoot(t *testing.T) { ID: whatsappTestAna.String(), Name: "Ana", } + require.NoError(t, test.messages.routes.Set("whatsapp:"+chat.ID, "Missing")) whatsappRouteTestAdd(t, inbox, chat, "Please check the plan.") require.NoError(t, inbox.deliver(t.Context(), test.loops[0], WhatsAppLink{}, true)) @@ -819,6 +820,7 @@ func TestQueuedWhatsAppBatchUsesRootIfItsChildIsRemoved(t *testing.T) { ID: whatsappTestAna.String(), Name: "Ana", } + require.NoError(t, first.messages.routes.Set("whatsapp:"+chat.ID, "Garden")) whatsappRouteTestAdd(t, inbox, chat, "Keep the gate plan.") require.NoError(t, inbox.deliver(t.Context(), first.loops[0], WhatsAppLink{}, true)) @@ -853,6 +855,7 @@ func TestRoutedWhatsAppBatchesCanCloseOutOfNumberOrder(t *testing.T) { Name: "Garden plans", Group: true, } + require.NoError(t, test.messages.routes.Set("whatsapp:"+first.ID, "Garden")) require.NoError(t, test.messages.routes.Set("whatsapp:"+second.ID, "Garden")) @@ -901,6 +904,7 @@ func TestWhatsAppCatchupSeparatesChildAndRootBatches(t *testing.T) { ID: whatsappTestAna.String(), Name: "Ana", } + require.NoError(t, test.messages.routes.Set("whatsapp:"+garden.ID, "Garden")) require.NoError(t, test.messages.routes.Set("whatsapp:"+library.ID, "Library")) inbox.waitForCatchup() @@ -937,6 +941,7 @@ func TestRoutedWhatsAppQueueFailureKeepsTheInboxBatch(t *testing.T) { ID: whatsappTestAna.String(), Name: "Ana", } + require.NoError(t, first.messages.routes.Set("whatsapp:"+chat.ID, "Garden")) require.NoError(t, os.Mkdir(first.messages.path, 0o700)) whatsappRouteTestAdd(t, inbox, chat, "Keep the gate plan.")