all repos — telegram-bot-api @ a274ce7a9f689a8804c8d3c4d499225ed224c54a

Golang bindings for the Telegram Bot API

remove a useless test, add test for IsSuperGroup
Syfaro syfaro@foxpaw.in
Wed, 09 Dec 2015 20:13:31 -0600
commit

a274ce7a9f689a8804c8d3c4d499225ed224c54a

parent

c3304ed8a78814c6e3d9eb50f293522c6c1a9c21

1 files changed, 8 insertions(+), 10 deletions(-)

jump to
M types_test.gotypes_test.go

@@ -22,16 +22,6 @@ t.Fail()

} } -func TestMessageIsGroup(t *testing.T) { - from := tgbotapi.User{ID: 0} - chat := tgbotapi.Chat{ID: 10} - message := tgbotapi.Message{From: from, Chat: chat} - - if message.IsGroup() != true { - t.Fail() - } -} - func TestMessageTime(t *testing.T) { message := tgbotapi.Message{Date: 0}

@@ -61,6 +51,14 @@ func TestChatIsChannel(t *testing.T) {

chat := tgbotapi.Chat{ID: 10, Type: "channel"} if chat.IsChannel() != true { + t.Fail() + } +} + +func TestChatIsSuperGroup(t *testing.T) { + chat := tgbotapi.Chat{ID: 10, Type: "supergroup"} + + if !chat.IsSuperGroup() { t.Fail() } }