коммит произвёл
Jesús Espino
родитель
197e336ddc
Коммит
b8dc5e3620
@@ -6,6 +6,8 @@ package model
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSamlCertificateStatusJson(t *testing.T) {
|
func TestSamlCertificateStatusJson(t *testing.T) {
|
||||||
@@ -13,12 +15,8 @@ func TestSamlCertificateStatusJson(t *testing.T) {
|
|||||||
json := status.ToJson()
|
json := status.ToJson()
|
||||||
rstatus := SamlCertificateStatusFromJson(strings.NewReader(json))
|
rstatus := SamlCertificateStatusFromJson(strings.NewReader(json))
|
||||||
|
|
||||||
if status.IdpCertificateFile != rstatus.IdpCertificateFile {
|
require.Equal(t, status.IdpCertificateFile, rstatus.IdpCertificateFile, "IdpCertificateFile do not match")
|
||||||
t.Fatal("IdpCertificateFile do not match")
|
|
||||||
}
|
|
||||||
|
|
||||||
rstatus = SamlCertificateStatusFromJson(strings.NewReader("junk"))
|
rstatus = SamlCertificateStatusFromJson(strings.NewReader("junk"))
|
||||||
if rstatus != nil {
|
require.Nil(t, rstatus, "should be nil")
|
||||||
t.Fatal("should be nil")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user