Added `live_period` for Location (tests)
parent
65947daaab
commit
7031d820be
|
@ -266,7 +266,7 @@ func TestSendWithContact(t *testing.T) {
|
||||||
func TestSendWithLocation(t *testing.T) {
|
func TestSendWithLocation(t *testing.T) {
|
||||||
bot, _ := getBot(t)
|
bot, _ := getBot(t)
|
||||||
|
|
||||||
_, err := bot.Send(tgbotapi.NewLocation(ChatID, 40, 40))
|
_, err := bot.Send(tgbotapi.NewLocation(ChatID, 40, 40, 86400))
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
|
|
|
@ -126,13 +126,14 @@ func TestNewInlineQueryResultDocument(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestNewInlineQueryResultLocation(t *testing.T) {
|
func TestNewInlineQueryResultLocation(t *testing.T) {
|
||||||
result := tgbotapi.NewInlineQueryResultLocation("id", "name", 40, 50)
|
result := tgbotapi.NewInlineQueryResultLocation("id", "name", 40, 50, 86400)
|
||||||
|
|
||||||
if result.Type != "location" ||
|
if result.Type != "location" ||
|
||||||
result.ID != "id" ||
|
result.ID != "id" ||
|
||||||
result.Title != "name" ||
|
result.Title != "name" ||
|
||||||
result.Latitude != 40 ||
|
result.Latitude != 40 ||
|
||||||
result.Longitude != 50 {
|
result.Longitude != 50 ||
|
||||||
|
result.LivePeriod != 86400 {
|
||||||
t.Fail()
|
t.Fail()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue