chore: refresh gramsrv public release
This commit is contained in:
parent
75cebe8dbf
commit
70b6820474
1274 changed files with 378751 additions and 59919 deletions
17
internal/rpc/contacts_users_projection_test.go
Normal file
17
internal/rpc/contacts_users_projection_test.go
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
package rpc
|
||||
|
||||
import (
|
||||
"github.com/gotd/td/clock"
|
||||
"github.com/gotd/td/tg"
|
||||
"go.uber.org/zap/zaptest"
|
||||
"telesrv/internal/domain"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestRouterTGUserUsesPersistedLastSeen(t *testing.T) {
|
||||
r := New(Config{}, Deps{}, zaptest.NewLogger(t), clock.System)
|
||||
got := r.tgUser(domain.User{ID: 1000000002, FirstName: "Bob", LastSeenAt: 1700000000})
|
||||
if status, ok := got.Status.(*tg.UserStatusOffline); !ok || status.WasOnline != 1700000000 {
|
||||
t.Fatalf("status = %#v, want userStatusOffline was_online=1700000000", got.Status)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue