From a274ce7a9f689a8804c8d3c4d499225ed224c54a Mon Sep 17 00:00:00 2001 From: Syfaro Date: Wed, 9 Dec 2015 20:13:31 -0600 Subject: [PATCH] remove a useless test, add test for IsSuperGroup --- types_test.go | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/types_test.go b/types_test.go index 17ac99e..68c57bb 100644 --- a/types_test.go +++ b/types_test.go @@ -22,16 +22,6 @@ func TestUserStringWithUserName(t *testing.T) { } } -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} @@ -65,6 +55,14 @@ func TestChatIsChannel(t *testing.T) { } } +func TestChatIsSuperGroup(t *testing.T) { + chat := tgbotapi.Chat{ID: 10, Type: "supergroup"} + + if !chat.IsSuperGroup() { + t.Fail() + } +} + func TestFileLink(t *testing.T) { file := tgbotapi.File{FilePath: "test/test.txt"}