]> git.giacomolli.uk - onechat/blobdiff - whatsapp_send_test.go
Separate multiline Go statements
[onechat] / whatsapp_send_test.go
index 85b7d15b6f82535f2909c950bb1b9f536848c272..a2e9a926a5c40044b266902f0e1471828715cee1 100644 (file)
@@ -335,6 +335,7 @@ func TestWhatsAppImageFailureKeepsNoSecretsAndDoesNotRetry(t *testing.T) {
                },
                {name: "send failure stores a safe cause"},
        }
                },
                {name: "send failure stores a safe cause"},
        }
+
        for _, tc := range testCases {
                t.Run(tc.name, func(t *testing.T) {
                        whatsapp, fake := whatsappStartTestLinked(t)
        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,
                },
        }
                        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())
        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())