]> git.giacomolli.uk - onechat/blobdiff - routes_test.go
Separate multiline Go statements
[onechat] / routes_test.go
index dda77ea4cdfe756940362ed8ae92282b0f39bcc3..2aadc7e7f2925dc444740325aa8070743c8794c2 100644 (file)
@@ -88,6 +88,7 @@ func TestRoutesRefuseUnknownSourcesAndNonchildren(t *testing.T) {
                        cause:  "must be a child",
                },
        }
+
        for _, tc := range testCases {
                t.Run(tc.name, func(t *testing.T) {
                        arguments := `{"source":"` + tc.source + `","agent":"` + tc.agent + `"}`
@@ -122,6 +123,7 @@ func TestWhatsAppStatusListsRoutes(t *testing.T) {
        whatsapp.Command("status", func(text string) {
                answer = text
        })
+
        require.Contains(t, answer, "WhatsApp is not linked.")
        require.Contains(t, answer, "WhatsApp routes:\nwhatsapp:"+whatsappTestFamily.String()+" -> Garden")
 }
@@ -144,6 +146,7 @@ func TestInvalidRouteFileStopsStartup(t *testing.T) {
                        text: `{"whatsapp:example@lid":""}`,
                },
        }
+
        for _, tc := range testCases {
                t.Run(tc.name, func(t *testing.T) {
                        path := filepath.Join(t.TempDir(), "routes.json")