remove a useless test, add test for IsSuperGroup

bot-api-6.1
Syfaro 2015-12-09 20:13:31 -06:00
parent c3304ed8a7
commit a274ce7a9f
1 changed files with 8 additions and 10 deletions

View File

@ -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"}