Files
worker/internal/tg/bot_test.go
Gleb Tv 2c7a0236da feat: publish standalone worker
Separate worker packaging and service lifecycle from the control plane.
2026-07-13 17:55:14 +03:00

15 строки
475 B
Go

package tg
import (
"testing"
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
"github.com/stretchr/testify/assert"
)
func TestTelegramAPIEndpoint(t *testing.T) {
assert.Equal(t, tgbotapi.APIEndpoint, telegramAPIEndpoint(""))
assert.Equal(t, "https://api.telegram.org/bot%s/%s", telegramAPIEndpoint("https://api.telegram.org"))
assert.Equal(t, "https://proxy.example.com/telegram/bot%s/%s", telegramAPIEndpoint("https://proxy.example.com/telegram/"))
}