Replace t.Fatal for the testify require.Equal function (#12646)

This commit is contained in:
Simon Frey
2019-10-11 13:07:17 +00:00
committed by Jesús Espino
parent 4cbbf7768d
commit 60def7a488

View File

@@ -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")
}