From b1d13a2d897147de8290a03e624efe4000dc9aa7 Mon Sep 17 00:00:00 2001 From: Adrian Carolli Date: Thu, 11 Jan 2018 16:30:55 -0500 Subject: [PLT-7793] Add /users/tokens/search endpoint (#8088) * Add /users/tokens/search endpoint + tests * Fix check-style * Unnecessary deletion --- model/user_access_token_search_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 model/user_access_token_search_test.go (limited to 'model/user_access_token_search_test.go') diff --git a/model/user_access_token_search_test.go b/model/user_access_token_search_test.go new file mode 100644 index 000000000..15a53f536 --- /dev/null +++ b/model/user_access_token_search_test.go @@ -0,0 +1,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") + } +} -- cgit v1.2.3-1-g7c22