blob: f7f6d66f755fbc98920f04e17c18fddee1666e5e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package model
import (
"strings"
"testing"
)
func TestChannelSearchJson(t *testing.T) {
channelSearch := ChannelSearch{Term: NewId()}
json := channelSearch.ToJson()
rchannelSearch := ChannelSearchFromJson(strings.NewReader(json))
if channelSearch.Term != rchannelSearch.Term {
t.Fatal("Terms do not match")
}
}
|