Make MoreComments field in Things a list

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
Vartan Benohanian
2020-08-12 22:55:00 -04:00
parent aa1de29812
commit 4a2284755f
3 changed files with 28 additions and 20 deletions
+4 -4
View File
@@ -717,7 +717,7 @@ func TestPostService_More(t *testing.T) {
ParentID: "t3_123",
PostID: "t3_123",
Replies: Replies{
MoreComments: &More{
More: &More{
Children: []string{"def,ghi"},
},
},
@@ -743,7 +743,7 @@ func TestPostService_More(t *testing.T) {
_, err = client.Comment.LoadMoreReplies(ctx, parentComment)
require.NoError(t, err)
require.Nil(t, parentComment.Replies.MoreComments)
require.Nil(t, parentComment.Replies.More)
require.Len(t, parentComment.Replies.Comments, 1)
require.Len(t, parentComment.Replies.Comments[0].Replies.Comments, 1)
}
@@ -757,7 +757,7 @@ func TestPostService_MoreNil(t *testing.T) {
parentComment := &Comment{
Replies: Replies{
MoreComments: nil,
More: nil,
},
}
@@ -766,7 +766,7 @@ func TestPostService_MoreNil(t *testing.T) {
require.NoError(t, err)
require.Nil(t, resp)
parentComment.Replies.MoreComments = &More{
parentComment.Replies.More = &More{
Children: []string{},
}