summaryrefslogtreecommitdiffstats
path: root/model/team_search_test.go
blob: 0f118c9ec2156028d728c6ac32b34d00ea2aa8f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

package model

import (
	"strings"
	"testing"
)

func TestTeamSearchJson(t *testing.T) {
	teamSearch := TeamSearch{Term: NewId()}
	json := teamSearch.ToJson()
	rteamSearch := ChannelSearchFromJson(strings.NewReader(json))

	if teamSearch.Term != rteamSearch.Term {
		t.Fatal("Terms do not match")
	}
}