X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/7b8d8e8f4b57bd51fd6d0f0d926b821f06b0e1f0..496569ab5b179932c60b2924bf4c61176c8be004:/whatsapp_send_test.go?ds=sidebyside diff --git a/whatsapp_send_test.go b/whatsapp_send_test.go index 85b7d15..a2e9a92 100644 --- a/whatsapp_send_test.go +++ b/whatsapp_send_test.go @@ -335,6 +335,7 @@ func TestWhatsAppImageFailureKeepsNoSecretsAndDoesNotRetry(t *testing.T) { }, {name: "send failure stores a safe cause"}, } + for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { whatsapp, fake := whatsappStartTestLinked(t) @@ -432,6 +433,7 @@ func TestTelegramReceivedPhotoCanBeShownAndSentToWhatsApp(t *testing.T) { bot: bot, }, } + require.NotContains(t, box.run(t.Context(), "image_show", `{"image":"`+names[0]+`","caption":"The plan."}`), "error:") require.Contains(t, box.run(t.Context(), "whatsapp_send", `{"id":"forward","chat":"15550002222@s.whatsapp.net","text":"The plan.","image":"`+names[0]+`"}`), "Sent to") require.Equal(t, [][]byte{picture}, fake.Uploads())