Replaced t.Fatal with require.Equal (#12536)
Этот коммит содержится в:
коммит произвёл
Elias Nahum
родитель
2f77622b89
Коммит
1f6cf84bb2
@@ -6,6 +6,8 @@ package model
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMfaSecretJson(t *testing.T) {
|
func TestMfaSecretJson(t *testing.T) {
|
||||||
@@ -13,7 +15,5 @@ func TestMfaSecretJson(t *testing.T) {
|
|||||||
json := secret.ToJson()
|
json := secret.ToJson()
|
||||||
result := MfaSecretFromJson(strings.NewReader(json))
|
result := MfaSecretFromJson(strings.NewReader(json))
|
||||||
|
|
||||||
if secret.Secret != result.Secret {
|
require.Equal(t, secret.Secret, result.Secret, "Secrets do not match")
|
||||||
t.Fatal("Secrets do not match")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user