feat(types): add language code to user struct
This commit is contained in:
parent
afe64e63be
commit
f1ed87c281
2 changed files with 9 additions and 7 deletions
|
@ -1,13 +1,14 @@
|
|||
package tgbotapi_test
|
||||
|
||||
import (
|
||||
"github.com/go-telegram-bot-api/telegram-bot-api"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/go-telegram-bot-api/telegram-bot-api"
|
||||
)
|
||||
|
||||
func TestUserStringWith(t *testing.T) {
|
||||
user := tgbotapi.User{0, "Test", "Test", ""}
|
||||
user := tgbotapi.User{0, "Test", "Test", "", "en"}
|
||||
|
||||
if user.String() != "Test Test" {
|
||||
t.Fail()
|
||||
|
@ -15,7 +16,7 @@ func TestUserStringWith(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestUserStringWithUserName(t *testing.T) {
|
||||
user := tgbotapi.User{0, "Test", "Test", "@test"}
|
||||
user := tgbotapi.User{0, "Test", "Test", "@test", "en"}
|
||||
|
||||
if user.String() != "@test" {
|
||||
t.Fail()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue