Add methods for editing messages.

This commit is contained in:
Syfaro 2016-04-12 12:53:19 -05:00
parent a92f88ce2c
commit b6130533a3
2 changed files with 110 additions and 0 deletions

View file

@ -340,6 +340,28 @@ func TestSendChatConfig(t *testing.T) {
}
}
func TestSendEditMessage(t *testing.T) {
bot, _ := getBot(t)
msg, err := bot.Send(tgbotapi.NewMessage(ChatID, "Testing editing."))
if err != nil {
t.Fail()
}
edit := tgbotapi.EditMessageTextConfig{
BaseEdit: tgbotapi.BaseEdit{
ChatID: ChatID,
MessageID: msg.MessageID,
},
Text: "Updated text.",
}
_, err = bot.Send(edit)
if err != nil {
t.Fail()
}
}
func TestGetUserProfilePhotos(t *testing.T) {
bot, _ := getBot(t)