Replace t.Fatal for the testify require.Equal function (#12646)
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
4cbbf7768d
Коммит
60def7a488
@@ -4,6 +4,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
@@ -12,8 +13,5 @@ func TestUserAccessTokenSearchJson(t *testing.T) {
|
||||
userAccessTokenSearch := UserAccessTokenSearch{Term: NewId()}
|
||||
json := userAccessTokenSearch.ToJson()
|
||||
ruserAccessTokenSearch := UserAccessTokenSearchFromJson(strings.NewReader(json))
|
||||
|
||||
if userAccessTokenSearch.Term != ruserAccessTokenSearch.Term {
|
||||
t.Fatal("Terms do not match")
|
||||
}
|
||||
require.Equal(t, userAccessTokenSearch.Term, ruserAccessTokenSearch.Term, "Terms do not match")
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user