From 77dc6a9544854cf6b2cba1ffb192eb02dd96d22d Mon Sep 17 00:00:00 2001 From: Sheshagiri Rao Mallipedhi Date: Fri, 11 Oct 2019 06:04:16 -0700 Subject: [PATCH] refactor tests, move to testify tests (#12604) --- model/audit_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/model/audit_test.go b/model/audit_test.go index 44e4cfb34b..7a9ce9395e 100644 --- a/model/audit_test.go +++ b/model/audit_test.go @@ -6,14 +6,13 @@ package model import ( "strings" "testing" + + "github.com/stretchr/testify/require" ) func TestAuditJson(t *testing.T) { audit := Audit{Id: NewId(), UserId: NewId(), CreateAt: GetMillis()} json := audit.ToJson() result := AuditFromJson(strings.NewReader(json)) - - if audit.Id != result.Id { - t.Fatal("Ids do not match") - } + require.Equal(t, audit.Id, result.Id, "Ids do not match") }