Skip to content

Commit a274ce7

Browse files
author
Syfaro
committed
remove a useless test, add test for IsSuperGroup
1 parent c3304ed commit a274ce7

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

types_test.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,6 @@ func TestUserStringWithUserName(t *testing.T) {
2222
}
2323
}
2424

25-
func TestMessageIsGroup(t *testing.T) {
26-
from := tgbotapi.User{ID: 0}
27-
chat := tgbotapi.Chat{ID: 10}
28-
message := tgbotapi.Message{From: from, Chat: chat}
29-
30-
if message.IsGroup() != true {
31-
t.Fail()
32-
}
33-
}
34-
3525
func TestMessageTime(t *testing.T) {
3626
message := tgbotapi.Message{Date: 0}
3727

@@ -65,6 +55,14 @@ func TestChatIsChannel(t *testing.T) {
6555
}
6656
}
6757

58+
func TestChatIsSuperGroup(t *testing.T) {
59+
chat := tgbotapi.Chat{ID: 10, Type: "supergroup"}
60+
61+
if !chat.IsSuperGroup() {
62+
t.Fail()
63+
}
64+
}
65+
6866
func TestFileLink(t *testing.T) {
6967
file := tgbotapi.File{FilePath: "test/test.txt"}
7068

0 commit comments

Comments
 (0)