summaryrefslogtreecommitdiffstats
path: root/model/user_access_token_search_test.go
blob: 15a53f53684ee609b08021e7bf3a283550a562b5 (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 TestUserAccessTokenSearchJson(t *testing.T) {
	userAccessTokenSearch := UserAccessTokenSearch{Term: NewId()}
	json := userAccessTokenSearch.ToJson()
	ruserAccessTokenSearch := UserAccessTokenSearchFromJson(strings.NewReader(json))

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