From 7031d820be302f01d2e6380912101e3be6736878 Mon Sep 17 00:00:00 2001 From: pr0head Date: Fri, 13 Oct 2017 22:53:47 +0300 Subject: [PATCH] Added `live_period` for Location (tests) --- bot_test.go | 2 +- helpers_test.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bot_test.go b/bot_test.go index a811a27..968f78b 100644 --- a/bot_test.go +++ b/bot_test.go @@ -266,7 +266,7 @@ func TestSendWithContact(t *testing.T) { 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) diff --git a/helpers_test.go b/helpers_test.go index 9542f02..7c510e9 100644 --- a/helpers_test.go +++ b/helpers_test.go @@ -126,13 +126,14 @@ func TestNewInlineQueryResultDocument(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" || result.ID != "id" || result.Title != "name" || result.Latitude != 40 || - result.Longitude != 50 { + result.Longitude != 50 || + result.LivePeriod != 86400 { t.Fail() } }