mirror of
https://github.com/lukaszraczylo/go-telegram.git
synced 2026-11-24 06:45:31 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f40e766d1 |
@@ -31,7 +31,7 @@ func TestGetMe(t *testing.T) {
|
|||||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
u, err := api.GetMe(ctx, b)
|
u, err := api.GetMe(ctx, b, &api.GetMeParams{})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.True(t, u.IsBot)
|
require.True(t, u.IsBot)
|
||||||
}
|
}
|
||||||
@@ -48,7 +48,7 @@ func TestSendMessage(t *testing.T) {
|
|||||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
msg, err := api.SendMessage(ctx, b, &api.SendMessageParams{
|
msg, err := api.SendMessage(ctx, b, &api.SendMessageParams{
|
||||||
ChatID: chatID,
|
ChatID: api.ChatIDFromInt(chatID),
|
||||||
Text: "integration test " + time.Now().UTC().Format(time.RFC3339),
|
Text: "integration test " + time.Now().UTC().Format(time.RFC3339),
|
||||||
})
|
})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|||||||
Reference in New Issue
Block a user