Add helper for InlineKeyboardButtonLoginURL
This commit is contained in:
parent
ffe77fb717
commit
43b3f0ace1
3 changed files with 30 additions and 4 deletions
|
@ -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")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue