Skip to content

Commit

Permalink
Add comment on non-unicode line to force fail
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Thornton <[email protected]>
  • Loading branch information
zeripath committed Jun 17, 2020
1 parent 9e6a79b commit 4d7a16f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions integrations/api_pull_review_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,19 @@ func TestAPIPullReview(t *testing.T) {
Body: "first old line",
OldLineNum: 1,
NewLineNum: 0,
}, {
Path: "iso-8859-1.txt",
Body: "this line contains a non-utf-8 character",
OldLineNum: 0,
NewLineNum: 1,
},
},
})
resp = session.MakeRequest(t, req, http.StatusOK)
DecodeJSON(t, resp, &review)
assert.EqualValues(t, 6, review.ID)
assert.EqualValues(t, "PENDING", review.State)
assert.EqualValues(t, 2, review.CodeCommentsCount)
assert.EqualValues(t, 3, review.CodeCommentsCount)

// test SubmitPullReview
req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews/%d?token=%s", repo.OwnerName, repo.Name, pullIssue.Index, review.ID, token), &api.SubmitPullReviewOptions{
Expand All @@ -104,7 +109,7 @@ func TestAPIPullReview(t *testing.T) {
DecodeJSON(t, resp, &review)
assert.EqualValues(t, 6, review.ID)
assert.EqualValues(t, "APPROVED", review.State)
assert.EqualValues(t, 2, review.CodeCommentsCount)
assert.EqualValues(t, 3, review.CodeCommentsCount)

// test DeletePullReview
req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews?token=%s", repo.OwnerName, repo.Name, pullIssue.Index, token), &api.CreatePullReviewOptions{
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
xe��N�0D�#���4
J�A�5����,�x�zsV���5�D��ػ�7�,=��o.�E卢�q5J=���� r�=>4��O!�Š�����6ms�8��&\Ea�t�T��I�z��ԅ! �dso@a��&�K5�B)�r4��Q�`Y�L���b ���o`�a�3�@(��e�ԭ5���H�\s�H�9�9R�3)��@�S��_"��4sE0�R��.�U|/�m�ۿ]U��z�
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4a357436d925b5c974181ff12a994538ddc5a269
5f22f7d0d95d614d25a5b68592adb345a4b5c7fd

0 comments on commit 4d7a16f

Please sign in to comment.