Show reactions to threads
This commit is contained in:
@@ -338,7 +338,12 @@ func TestGetPullRequestUsesOriginalLineAndMetadata(t *testing.T) {
|
||||
"id":"c","body":"change this","diffHunk":"@@ -1 +1 @@","createdAt":"2026-01-01T00:00:00Z",
|
||||
"url":"cu","author":{"login":"reviewer"},"outdated":true,
|
||||
"line":100,"startLine":99,"originalLine":42,"originalStartLine":40,
|
||||
"originalCommit":{"oid":"0123456789abcdef"}
|
||||
"originalCommit":{"oid":"0123456789abcdef"},
|
||||
"reactionGroups":[
|
||||
{"content":"THUMBS_UP","viewerHasReacted":true,"reactors":{"totalCount":3}},
|
||||
{"content":"EYES","viewerHasReacted":false,"reactors":{"totalCount":1}},
|
||||
{"content":"HEART","viewerHasReacted":false,"reactors":{"totalCount":0}}
|
||||
]
|
||||
}]}
|
||||
}]}
|
||||
}}}}`))
|
||||
@@ -375,6 +380,11 @@ func TestGetPullRequestUsesOriginalLineAndMetadata(t *testing.T) {
|
||||
comment.OriginalCommitOID != "0123456789abcdef" || !comment.Outdated {
|
||||
t.Fatalf("unexpected comment snapshot: %#v", comment)
|
||||
}
|
||||
if len(comment.Reactions) != 2 ||
|
||||
comment.Reactions[0] != (ReactionSummary{Content: "THUMBS_UP", Count: 3, ViewerHasReacted: true}) ||
|
||||
comment.Reactions[1] != (ReactionSummary{Content: "EYES", Count: 1}) {
|
||||
t.Fatalf("unexpected comment reactions: %#v", comment.Reactions)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetPullRequestLoadsConflictFilesForConflictingPR(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user