MM-12234: configurable limit to user autocomplete and search matches (#9499)
* unit test cleanup * allow limiting user search results * clean up test users before starting * model UserSearchOptions to simplify parameters
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
e8c9ccaa7e
Коммит
715097cc76
@@ -4,14 +4,14 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"bytes"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestUserSearchJson(t *testing.T) {
|
||||
userSearch := UserSearch{Term: NewId(), TeamId: NewId()}
|
||||
json := userSearch.ToJson()
|
||||
ruserSearch := UserSearchFromJson(strings.NewReader(json))
|
||||
ruserSearch := UserSearchFromJson(bytes.NewReader(json))
|
||||
|
||||
if userSearch.Term != ruserSearch.Term {
|
||||
t.Fatal("Terms do not match")
|
||||
|
||||
Ссылка в новой задаче
Block a user