change t.Fatal to assert.Equal in post_list_test.go (#12678)

Этот коммит содержится в:
Shodiq Muhammad
2019-10-16 04:05:58 +07:00
коммит произвёл Ben Schumacher
родитель bc1ae7e93e
Коммит b43b84807e

Просмотреть файл

@@ -24,17 +24,9 @@ func TestPostListJson(t *testing.T) {
json := pl.ToJson()
rpl := PostListFromJson(strings.NewReader(json))
if rpl.Posts[p1.Id].Message != p1.Message {
t.Fatal("failed to serialize")
}
if rpl.Posts[p2.Id].Message != p2.Message {
t.Fatal("failed to serialize")
}
if rpl.Order[1] != p2.Id {
t.Fatal("failed to serialize")
}
assert.Equal(t, p1.Message, rpl.Posts[p1.Id].Message, "failed to serialize p1 message")
assert.Equal(t, p2.Message, rpl.Posts[p2.Id].Message, "failed to serialize p2 message")
assert.Equal(t, p2.Id, rpl.Order[1], "failed to serialize p2 Id")
}
func TestPostListExtend(t *testing.T) {