api4/user: Deduplicate userids for getUsersByIds endpoint (#24344)

Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2023-08-24 15:14:01 +03:00
коммит произвёл GitHub
родитель 4145fd2f4e
Коммит 639d73b3e7
3 изменённых файлов: 18 добавлений и 3 удалений

Просмотреть файл

@@ -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) {