all repos — telegram-bot-api @ 95a923dc4c570e5aadd7dbed2be03499892b3f6b

Golang bindings for the Telegram Bot API

Update tests.
Syfaro syfaro@huefox.com
Fri, 29 Dec 2017 00:50:45 -0600
commit

95a923dc4c570e5aadd7dbed2be03499892b3f6b

parent

271adc4d9703392d15d9ea33f316393bb0362ba8

1 files changed, 8 insertions(+), 8 deletions(-)

jump to
M bot_test.gobot_test.go

@@ -467,7 +467,7 @@ bot, _ := getBot(t)

time.Sleep(time.Second * 2) - bot.RemoveWebhook() + bot.Request(tgbotapi.RemoveWebhookConfig{}) wh := tgbotapi.NewWebhookWithCert("https://example.com/tgbotapi-test/"+bot.Token, "tests/cert.pem") _, err := bot.SetWebhook(wh)

@@ -476,7 +476,7 @@ t.Error(err)

t.Fail() } - bot.RemoveWebhook() + bot.Request(tgbotapi.RemoveWebhookConfig{}) } func TestSetWebhookWithoutCert(t *testing.T) {

@@ -484,7 +484,7 @@ bot, _ := getBot(t)

time.Sleep(time.Second * 2) - bot.RemoveWebhook() + bot.Request(tgbotapi.RemoveWebhookConfig{}) wh := tgbotapi.NewWebhook("https://example.com/tgbotapi-test/" + bot.Token) _, err := bot.SetWebhook(wh)

@@ -493,7 +493,7 @@ t.Error(err)

t.Fail() } - bot.RemoveWebhook() + bot.Request(tgbotapi.RemoveWebhookConfig{}) } func TestUpdatesChan(t *testing.T) {

@@ -611,7 +611,7 @@ deleteMessageConfig := tgbotapi.DeleteMessageConfig{

ChatID: message.Chat.ID, MessageID: message.MessageID, } - _, err := bot.DeleteMessage(deleteMessageConfig) + _, err := bot.Request(deleteMessageConfig) if err != nil { t.Error(err)

@@ -631,7 +631,7 @@ ChatID: message.Chat.ID,

MessageID: message.MessageID, DisableNotification: false, } - _, err := bot.PinChatMessage(pinChatMessageConfig) + _, err := bot.Request(pinChatMessageConfig) if err != nil { t.Error(err)

@@ -652,12 +652,12 @@ ChatID: message.Chat.ID,

MessageID: message.MessageID, DisableNotification: false, } - _, err := bot.PinChatMessage(pinChatMessageConfig) + _, err := bot.Request(pinChatMessageConfig) unpinChatMessageConfig := tgbotapi.UnpinChatMessageConfig{ ChatID: message.Chat.ID, } - _, err = bot.UnpinChatMessage(unpinChatMessageConfig) + _, err = bot.Request(unpinChatMessageConfig) if err != nil { t.Error(err)