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

package model

import (
	"strings"
	"testing"
)

func TestEmojiSearchJson(t *testing.T) {
	emojiSearch := EmojiSearch{Term: NewId()}
	json := emojiSearch.ToJson()
	remojiSearch := EmojiSearchFromJson(strings.NewReader(json))

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