From d828c543c9b94f93e42f8ebe584796bce85463d3 Mon Sep 17 00:00:00 2001 From: Sergey Parshukov Date: Wed, 2 Oct 2019 13:39:28 +0300 Subject: [PATCH] Fix crash in tests --- bot_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot_test.go b/bot_test.go index 1078a09..1702c5d 100644 --- a/bot_test.go +++ b/bot_test.go @@ -27,12 +27,12 @@ const ( func getBot(t *testing.T) (*tgbotapi.BotAPI, error) { bot, err := tgbotapi.NewBotAPI(TestToken) - bot.Debug = true if err != nil { t.Error(err) - t.Fail() + t.FailNow() } + bot.Debug = true return bot, err }