Skip to content

Commit e1c8295

Browse files
committed
verify more props parsed on pr review comment event
1 parent cbd2a8e commit e1c8295

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

src/test/java/com/spotify/github/v3/activity/events/PullRequestReviewCommentEventTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,16 @@ public void testDeserialization() throws IOException {
4545
assertThat(event.comment().nodeId(), is("abc234"));
4646
assertThat(event.pullRequest().nodeId(), is("abc123"));
4747
assertThat(event.comment().body(), is("Maybe you should use more emojji on this line."));
48+
assertThat(event.comment().originalCommitId(), is("0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c"));
49+
assertThat(event.comment().originalLine(), is(1));
50+
assertThat(event.comment().originalPosition(), is(1));
51+
assertThat(event.comment().originalStartLine(), is(1));
52+
assertThat(event.comment().line(), is(1));
53+
assertThat(event.comment().side(), is("RIGHT"));
54+
assertThat(event.comment().startLine(), is(1));
55+
assertThat(event.comment().startSide(), is("RIGHT"));
56+
assertThat(event.comment().authorAssociation(), is("NONE"));
57+
assertThat(event.comment().pullRequestReviewId(), is(42L));
58+
assertThat(event.comment().inReplyToId(), is(426899381L));
4859
}
4960
}

src/test/resources/com/spotify/github/v3/activity/events/fixtures/pull_request_review_comment_event.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,19 @@
77
"diff_hunk": "@@ -1 +1 @@\n-# public-repo",
88
"path": "README.md",
99
"position": 1,
10-
"original_position": 1,
1110
"commit_id": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
1211
"original_commit_id": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
12+
"original_line": 1,
13+
"original_position": 1,
14+
"original_start_line": 1,
15+
"line": 1,
16+
"side": "RIGHT",
17+
"start_line": 1,
18+
"start_side": "RIGHT",
19+
"author_association": "NONE",
20+
"pull_request_review_id": 42,
21+
"in_reply_to_id": 426899381,
22+
"subject_type": "line",
1323
"user": {
1424
"login": "baxterthehacker",
1525
"id": 6752317,

0 commit comments

Comments
 (0)