mirror of
https://github.com/appleboy/drone-telegram.git
synced 2026-06-04 18:23:45 +08:00
fix index out of range bug.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
@@ -146,6 +146,10 @@ func TestParseTo(t *testing.T) {
|
||||
|
||||
ids = parseTo(input, "a@gmail.com", true)
|
||||
assert.Equal(t, []int64{0, 4, 5}, ids)
|
||||
|
||||
// test empty ids
|
||||
ids = parseTo([]string{"", " ", " "}, "a@gmail.com", true)
|
||||
assert.Equal(t, 0, len(ids))
|
||||
}
|
||||
|
||||
func TestCheckFileExist(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user