require.Equal(t, "getUpdates", call.method)
require.Equal(t, map[string]any{
"offset": float64(7),
- "timeout": float64(telegramPollSeconds),
+ "timeout": float64(telegramUpdateWaitTimeout / time.Second),
"allowed_updates": []any{"message"},
}, call.params)
}
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
tc.reply(w)
}))
+
t.Cleanup(server.Close)
err := newTelegramAPI(server.URL, telegramTestToken).SendMessage(t.Context(), telegramTestOwner, "hi", nil)