all repos — telegram-bot-api @ 7031d820be302f01d2e6380912101e3be6736878

Golang bindings for the Telegram Bot API

Added `live_period` for Location (tests)
pr0head pr0head@gmail.com
Fri, 13 Oct 2017 22:53:47 +0300
commit

7031d820be302f01d2e6380912101e3be6736878

parent

65947daaab88cefc8f87b936cb1fafb60d09115d

2 files changed, 4 insertions(+), 3 deletions(-)

jump to
M bot_test.gobot_test.go

@@ -266,7 +266,7 @@

func TestSendWithLocation(t *testing.T) { bot, _ := getBot(t) - _, err := bot.Send(tgbotapi.NewLocation(ChatID, 40, 40)) + _, err := bot.Send(tgbotapi.NewLocation(ChatID, 40, 40, 86400)) if err != nil { t.Error(err)
M helpers_test.gohelpers_test.go

@@ -126,13 +126,14 @@ }

} func TestNewInlineQueryResultLocation(t *testing.T) { - result := tgbotapi.NewInlineQueryResultLocation("id", "name", 40, 50) + result := tgbotapi.NewInlineQueryResultLocation("id", "name", 40, 50, 86400) if result.Type != "location" || result.ID != "id" || result.Title != "name" || result.Latitude != 40 || - result.Longitude != 50 { + result.Longitude != 50 || + result.LivePeriod != 86400 { t.Fail() } }