You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
telebot/chat_test.go

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())
}