removeWebhook method added.

This commit is contained in:
Gleb Sinyavsky 2015-11-21 14:26:39 +03:00
parent 53dd9f6367
commit 9644984dae
4 changed files with 9 additions and 12 deletions

View file

@ -437,17 +437,15 @@ func TestSetWebhook(t *testing.T) {
t.Fail()
}
wh := tgbotapi.WebhookConfig{Clear: true}
_, err = bot.SetWebhook(wh)
bot.RemoveWebhook()
wh = tgbotapi.NewWebhookWithCert("https://example.com/tgbotapi-test/" + bot.Token, "tests/cert.pem")
wh := tgbotapi.NewWebhookWithCert("https://example.com/tgbotapi-test/"+bot.Token, "tests/cert.pem")
_, err = bot.SetWebhook(wh)
if err != nil {
t.Fail()
}
wh = tgbotapi.WebhookConfig{Clear: true}
_, err = bot.SetWebhook(wh)
bot.RemoveWebhook()
}
func TestUpdatesChan(t *testing.T) {