Migrate tests from model/compliance_test.go to use testify (#12497)
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
40ff87637d
Коммит
23d495beca
@@ -6,6 +6,8 @@ package model
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCompliance(t *testing.T) {
|
func TestCompliance(t *testing.T) {
|
||||||
@@ -13,7 +15,5 @@ func TestCompliance(t *testing.T) {
|
|||||||
json := o.ToJson()
|
json := o.ToJson()
|
||||||
result := ComplianceFromJson(strings.NewReader(json))
|
result := ComplianceFromJson(strings.NewReader(json))
|
||||||
|
|
||||||
if o.Desc != result.Desc {
|
require.Equal(t, o.Desc, result.Desc, "JobName do not match")
|
||||||
t.Fatal("JobName do not match")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user