15 строки
475 B
Go
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/"))
|
|
}
|