My own bot is used to test the added functionality.

bot-api-6.1
nightghost 2019-09-02 18:44:35 +03:00
parent 696aebd64c
commit aaaa278b56
1 changed files with 4 additions and 3 deletions

View File

@ -11,6 +11,7 @@ import (
const (
TestToken = "153667468:AAHlSHlMqSt1f_uFmVRJbm5gntu2HI4WW8I"
ChatID = 76918703
ChannelBot = "903278594:AAHmLoQncKOMKz2A644-cIK1Sb0VwfnOpGQ"
Channel = "@nightghost_test"
SupergroupChatID = -1001120141283
ReplyToMessageID = 35
@ -155,7 +156,7 @@ func TestSendWithNewPhotoReply(t *testing.T) {
}
func TestSendNewPhotoToChannel(t *testing.T) {
bot, _ := getBot(t)
bot, _ := NewBotAPI(ChannelBot)
msg := NewPhotoUploadToChannel(Channel, "tests/image.jpg")
msg.Caption = "Test"
@ -168,7 +169,7 @@ func TestSendNewPhotoToChannel(t *testing.T) {
}
func TestSendNewPhotoToChannelFileBytes(t *testing.T) {
bot, _ := getBot(t)
bot, _ := NewBotAPI(ChannelBot)
data, _ := ioutil.ReadFile("tests/image.jpg")
b := FileBytes{Name: "image.jpg", Bytes: data}
@ -184,7 +185,7 @@ func TestSendNewPhotoToChannelFileBytes(t *testing.T) {
}
func TestSendNewPhotoToChannelFileReader(t *testing.T) {
bot, _ := getBot(t)
bot, _ := NewBotAPI(ChannelBot)
f, _ := os.Open("tests/image.jpg")
reader := FileReader{Name: "image.jpg", Reader: f, Size: -1}