Add helper for InlineKeyboardButtonLoginURL

This commit is contained in:
Sergey 2019-09-06 16:41:36 +03:00
parent ffe77fb717
commit 43b3f0ace1
3 changed files with 30 additions and 4 deletions

View file

@ -136,6 +136,23 @@ func TestNewInlineQueryResultLocation(t *testing.T) {
}
}
func TestNewInlineKeyboardButtonLoginURL(t *testing.T) {
result := NewInlineKeyboardButtonLoginURL("text", LoginURL{
URL: "url",
ForwardText: "ForwardText",
BotUsername: "username",
RequestWriteAccess: false,
})
if result.Text != "text" ||
result.LoginURL.URL != "url" ||
result.LoginURL.ForwardText != "ForwardText" ||
result.LoginURL.BotUsername != "username" ||
result.LoginURL.RequestWriteAccess != false {
t.Fail()
}
}
func TestNewEditMessageText(t *testing.T) {
edit := NewEditMessageText(ChatID, ReplyToMessageID, "new text")