Fix backwards compatibility for Live Location.

This commit is contained in:
Syfaro 2017-12-29 13:00:02 -06:00
parent 4ec899a62e
commit 72f87b43e3
4 changed files with 14 additions and 17 deletions

View file

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