mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
refactor tests, move to testify tests (#12604)
This commit is contained in:
committed by
Jesús Espino
parent
8f93d3b6f0
commit
77dc6a9544
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user