diff --git a/model/post_list_test.go b/model/post_list_test.go index a24c710320..8ee618f2da 100644 --- a/model/post_list_test.go +++ b/model/post_list_test.go @@ -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) {