api4/user: Deduplicate userids for getUsersByIds endpoint (#24344)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4145fd2f4e
Коммит
639d73b3e7
@@ -1725,6 +1725,13 @@ func TestGetUsersByIds(t *testing.T) {
|
||||
|
||||
require.Len(t, users, 1, "1 user should be returned")
|
||||
})
|
||||
|
||||
t.Run("should only return unique users when multiple IDs are requested", func(t *testing.T) {
|
||||
users, _, err := client.GetUsersByIds(context.Background(), []string{th.BasicUser.Id, th.BasicUser.Id, th.BasicUser.Id})
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Len(t, users, 1, "1 user should be returned")
|
||||
})
|
||||
})
|
||||
|
||||
t.Run("should return error when not logged in", func(t *testing.T) {
|
||||
|
||||
Ссылка в новой задаче
Block a user