]> git.giacomolli.uk - onechat/blobdiff - telegram_test.go
Check spacing between Go statement blocks
[onechat] / telegram_test.go
index e360045f50341bd027b29ff631ec456ae6e1638c..f1a76b66609b9fd357895edc951e3819ecedfb50 100644 (file)
@@ -322,6 +322,7 @@ func TestRepliesGoAsRichMessages(t *testing.T) {
        telegramWaitForSent(t, telegram, telegramTextOnly)
 
        var sends []TelegramFakeCall
        telegramWaitForSent(t, telegram, telegramTextOnly)
 
        var sends []TelegramFakeCall
+
        for _, call := range telegram.Calls() {
                if call.method == "sendMessage" || call.method == "sendRichMessage" {
                        sends = append(sends, call)
        for _, call := range telegram.Calls() {
                if call.method == "sendMessage" || call.method == "sendRichMessage" {
                        sends = append(sends, call)
@@ -433,6 +434,7 @@ func TestRichMessageFailures(t *testing.T) {
                        })
 
                        var methods []string
                        })
 
                        var methods []string
+
                        for _, call := range telegram.Calls() {
                                methods = append(methods, call.method)
                        }
                        for _, call := range telegram.Calls() {
                                methods = append(methods, call.method)
                        }
@@ -551,6 +553,7 @@ func TestRefusedRichPartGoesWithTheTextAsWritten(t *testing.T) {
        })
 
        var fallback, rich []string
        })
 
        var fallback, rich []string
+
        for _, call := range telegram.Calls() {
                switch {
                case !call.ok:
        for _, call := range telegram.Calls() {
                switch {
                case !call.ok:
@@ -640,6 +643,7 @@ func TestBotLogsAnOutageOnlyAtItsStartAndEnd(t *testing.T) {
        })
 
        telegramWaitForSent(t, telegram, "ok")
        })
 
        telegramWaitForSent(t, telegram, "ok")
+
        lines := strings.Split(strings.TrimSuffix(logs.String(), "\n"), "\n")
        require.Len(t, lines, 2)
        require.Equal(t, "receive failed: 502 Bad Gateway (retry in 1ms)", lines[0])
        lines := strings.Split(strings.TrimSuffix(logs.String(), "\n"), "\n")
        require.Len(t, lines, 2)
        require.Equal(t, "receive failed: 502 Bad Gateway (retry in 1ms)", lines[0])