Implement some MFA endpoints for APIv4 (#5864)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a0d5c01dfd
Коммит
58397f853a
19
model/mfa_secret_test.go
Обычный файл
19
model/mfa_secret_test.go
Обычный файл
@@ -0,0 +1,19 @@
|
||||
// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved.
|
||||
// See License.txt for license information.
|
||||
|
||||
package model
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMfaSecretJson(t *testing.T) {
|
||||
secret := MfaSecret{Secret: NewId(), QRCode: NewId()}
|
||||
json := secret.ToJson()
|
||||
result := MfaSecretFromJson(strings.NewReader(json))
|
||||
|
||||
if secret.Secret != result.Secret {
|
||||
t.Fatal("Secrets do not match")
|
||||
}
|
||||
}
|
||||
Ссылка в новой задаче
Block a user