github.com/wgh-/mattermost-server@v4.8.0-rc2+incompatible/model/team_search_test.go (about) 1 // Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. 2 // See License.txt for license information. 3 4 package model 5 6 import ( 7 "strings" 8 "testing" 9 ) 10 11 func TestTeamSearchJson(t *testing.T) { 12 teamSearch := TeamSearch{Term: NewId()} 13 json := teamSearch.ToJson() 14 rteamSearch := ChannelSearchFromJson(strings.NewReader(json)) 15 16 if teamSearch.Term != rteamSearch.Term { 17 t.Fatal("Terms do not match") 18 } 19 }