blob: c062e73115a0a7bcaacc95ddecd1ea58e3689b40 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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")
}
}
|