aboutsummaryrefslogtreecommitdiff
path: root/telegram/utils_test.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2023-01-16 04:35:13 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2023-01-16 04:35:13 +0300
commitb3b53b6145c4b8e31d134942507c3ce0226182a4 (patch)
tree4f0753727317859504c26dd5bd4f338991db9082 /telegram/utils_test.go
parent68e3581724f04366c114f267b3264075bc635061 (diff)
OOB
Diffstat (limited to 'telegram/utils_test.go')
-rw-r--r--telegram/utils_test.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/telegram/utils_test.go b/telegram/utils_test.go
index f0140ae..bfd6c49 100644
--- a/telegram/utils_test.go
+++ b/telegram/utils_test.go
@@ -146,10 +146,13 @@ func TestFormatFile(t *testing.T) {
},
}
- content := c.formatFile(&file, false)
+ content, link := c.formatFile(&file, false)
if content != ". (23 kbytes) | " {
t.Errorf("Wrong file label: %v", content)
}
+ if link != "" {
+ t.Errorf("Wrong file link: %v", link)
+ }
}
func TestFormatPreview(t *testing.T) {
@@ -168,10 +171,13 @@ func TestFormatPreview(t *testing.T) {
},
}
- content := c.formatFile(&file, true)
+ content, link := c.formatFile(&file, true)
if content != "" {
t.Errorf("Wrong preview label: %v", content)
}
+ if link != "" {
+ t.Errorf("Wrong preview link: %v", link)
+ }
}
func TestMessageToTextSticker(t *testing.T) {