-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrobot_test.go
57 lines (50 loc) · 18.8 KB
/
robot_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package WechatWorkRobot
import (
"fmt"
"os"
"testing"
)
var key = os.Getenv("BOT_KEY")
var robot = Robot{Key: key}
func TestRobot_SendText(t *testing.T) {
fmt.Println("BOT_KEY", key)
res, _ := robot.SendText("文本发送测试!")
if res.ErrorCode != 0 {
t.Fatal(res.ErrorMessage)
}
}
func TestRobot_SendMarkdown(t *testing.T) {
res, _ := robot.SendMarkdown(
`
# 这是一个标题
> 类型: Markdown
> 作者: 远浅
> 来源: 1.1.1.1
`)
if res.ErrorCode != 0 {
t.Fatal(res.ErrorMessage)
}
}
func TestRobot_SendImage(t *testing.T) {
res, _ := robot.SendImage(
"iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAgAElEQVR4Xu1dB5gURdp+a3Z2dpcsiCJIFhVFzAlzDkdcggFERFFEURABJZgVzzsDKgiHioqYz1NPDHf6Hyp6KsgZUUkqQQkCAgq7bO/0/1R3V091de6Znp3e7X4emNnp+ip8VW99ob6qItKtB8qIn5gDMQcsOUBigMQjI+aAPQdigMSjI+aAAweIdOsBMmSiJZEB+lVRurjfWAZE+03mtDIlfUyvsijmX20bP0S65YDYBonn0JgDNhxQAcJDhAkDPyyL6TPcivnnZ+ToglcnKjD+EenmWIL479GYoq5wIAZIXenpuJ2BOECkm2IJEohzMVGd4EAMkDrRzXEjg3KASJOpBLGwshX3rRcHl+4X1uqgWVkxfcy/WjB+iDS5sxcUBAVgTBdzINIciAES6e6LKx82B4g0KZYgYTM5zj+6HIgBEt2+i2ueBw4QaWIsQfLA57iIiHIgBkhEOy6udn44QKQJ+xu9WErELvcTH6nL6kTT2LnwYvqYf7Vo/JgBkh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/peM2kzNmz4XAHe7RM+uXAqce6RaLgt3od+PPQmY/Zq/+lx4FrD440xe9Nvd04E+A/3lw6d+71/AFf2N9FQdfStLdTR4jWqEsu4A5POFwIDTjavnTZsBH6/ILk7poh7AJ+8b871jKnDeEOcOffEpYMJINQ07MIJ+HzkeuMbH6SeVlcDhrQH6yT//Xgy06xh8UN17GzDj3gw9rWPfQcCULNTR4LWpMcq6A5AaY3FccJQ5EAMkyr0X1z10DsQACZ3FcQFR5kAMkCj3Xlz30DkQAyR0FscFRJkDMUCi3Htx3UPnQAyQ0FkcFxBlDsQAiXLvxXUPnQP/D/txOb1Ycb+wAAAAAElFTkSuQmCC",
"539fe71a3b2b0f7302296653575d8722",
)
if res.ErrorCode != 0 {
t.Fatal(res.ErrorMessage)
}
}
func TestRobot_SendNews(t *testing.T) {
ns := []*NewsItem{
{
Title: "卡片消息标题",
Description: "卡片消息描述",
URL: "https://happysooner.com",
Picurl: "http://res.mail.qq.com/node/ww/wwopenmng/images/independent/doc/test_pic_msg1.png",
},
}
res, _ := robot.SendNews(ns)
if res.ErrorCode != 0 {
t.Fatal(res.ErrorMessage)
}
}