telebot/chat_test.go
Кобелев Андрей Андреевич 1b497f2b9b init
2023-02-01 12:08:20 +03:00

22 lines
443 B
Go

package telebot
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestChat(t *testing.T) {
user := &User{ID: 1}
chat := &Chat{ID: 1}
chatID := ChatID(1)
assert.Implements(t, (*Recipient)(nil), user)
assert.Implements(t, (*Recipient)(nil), chat)
assert.Implements(t, (*Recipient)(nil), chatID)
assert.Equal(t, "1", user.Recipient())
assert.Equal(t, "1", chat.Recipient())
assert.Equal(t, "1", chatID.Recipient())
}