mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Migrate assert (#12643)
This commit is contained in:
committed by
Jesús Espino
parent
867027117e
commit
68fc1b6e5e
@@ -6,6 +6,8 @@ package model
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestClusterInfoJson(t *testing.T) {
|
||||
@@ -13,9 +15,7 @@ func TestClusterInfoJson(t *testing.T) {
|
||||
json := cluster.ToJson()
|
||||
result := ClusterInfoFromJson(strings.NewReader(json))
|
||||
|
||||
if cluster.IpAddress != result.IpAddress {
|
||||
t.Fatal("Ids do not match")
|
||||
}
|
||||
assert.Equal(t, cluster.IpAddress, result.IpAddress, "Ids do not match")
|
||||
}
|
||||
|
||||
func TestClusterInfosJson(t *testing.T) {
|
||||
@@ -25,7 +25,5 @@ func TestClusterInfosJson(t *testing.T) {
|
||||
json := ClusterInfosToJson(clusterInfos)
|
||||
result := ClusterInfosFromJson(strings.NewReader(json))
|
||||
|
||||
if clusterInfos[0].IpAddress != result[0].IpAddress {
|
||||
t.Fatal("Ids do not match")
|
||||
}
|
||||
assert.Equal(t, clusterInfos[0].IpAddress, result[0].IpAddress, "Ids do not match")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user