change t.Fatal to assert.Equal in post_list_test.go (#12678)
Этот коммит содержится в:
коммит произвёл
Ben Schumacher
родитель
bc1ae7e93e
Коммит
b43b84807e
@@ -24,17 +24,9 @@ func TestPostListJson(t *testing.T) {
|
|||||||
json := pl.ToJson()
|
json := pl.ToJson()
|
||||||
rpl := PostListFromJson(strings.NewReader(json))
|
rpl := PostListFromJson(strings.NewReader(json))
|
||||||
|
|
||||||
if rpl.Posts[p1.Id].Message != p1.Message {
|
assert.Equal(t, p1.Message, rpl.Posts[p1.Id].Message, "failed to serialize p1 message")
|
||||||
t.Fatal("failed to serialize")
|
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")
|
||||||
|
|
||||||
if rpl.Posts[p2.Id].Message != p2.Message {
|
|
||||||
t.Fatal("failed to serialize")
|
|
||||||
}
|
|
||||||
|
|
||||||
if rpl.Order[1] != p2.Id {
|
|
||||||
t.Fatal("failed to serialize")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPostListExtend(t *testing.T) {
|
func TestPostListExtend(t *testing.T) {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user