Commit b43b8480 authored by Shodiq Muhammad's avatar Shodiq Muhammad Committed by Ben Schumacher
Browse files

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

parent bc1ae7e9
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment