[PLT-7793] Add /users/tokens/search endpoint (#8088)
* Add /users/tokens/search endpoint + tests * Fix check-style * Unnecessary deletion
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
1d9efd0e39
Коммит
b1d13a2d89
19
model/user_access_token_search_test.go
Обычный файл
19
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")
|
||||
}
|
||||
}
|
||||
Ссылка в новой задаче
Block a user