mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* unit test cleanup * allow limiting user search results * clean up test users before starting * model UserSearchOptions to simplify parameters
20 lines
425 B
Go
20 lines
425 B
Go
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
package model
|
|
|
|
import (
|
|
"bytes"
|
|
"testing"
|
|
)
|
|
|
|
func TestUserSearchJson(t *testing.T) {
|
|
userSearch := UserSearch{Term: NewId(), TeamId: NewId()}
|
|
json := userSearch.ToJson()
|
|
ruserSearch := UserSearchFromJson(bytes.NewReader(json))
|
|
|
|
if userSearch.Term != ruserSearch.Term {
|
|
t.Fatal("Terms do not match")
|
|
}
|
|
}
|