X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/80e348724041a694002fc38f57e8868b9b9a2be9..c781f79f3c8cb9a7577ee1574d196988da2719b3:/whatsapp_send_test.go 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())