Skip to content

Commit

Permalink
fix(bot): test failed
Browse files Browse the repository at this point in the history
  • Loading branch information
iyear committed Aug 31, 2022
1 parent a36eeb7 commit ad172cd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
19 changes: 0 additions & 19 deletions app/bot/run/internal/util/bot_test.go

This file was deleted.

19 changes: 19 additions & 0 deletions pkg/utils/telegram_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package utils

import "testing"

func TestGetMsgLink(t *testing.T) {
tt := []struct {
chat int64
msg int
out string
}{
{1697797156, 4, "https://t.me/c/1697797156/4"},
{1231494493, 148, "https://t.me/c/1231494493/148"},
}
for _, n := range tt {
if out := Telegram.GetMsgLink(n.chat, n.msg); out != n.out {
t.Errorf("expected %s, got %s", n.out, out)
}
}
}

0 comments on commit ad172cd

Please sign in to comment.