Add tests for pull request's content_version in API (#37044)

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
This commit is contained in:
wxiaoguang
2026-03-31 01:28:45 +08:00
committed by GitHub
parent 9bb0aa1c49
commit daf581fa89
5 changed files with 72 additions and 9 deletions
+1 -2
View File
@@ -472,8 +472,7 @@ func testAPIIssueContentVersion(t *testing.T) {
req := NewRequest(t, "GET", urlStr).AddTokenAuth(token)
resp := MakeRequest(t, req, http.StatusOK)
var before api.Issue
DecodeJSON(t, resp, &before)
before := DecodeJSON(t, resp, &api.Issue{})
req = NewRequestWithJSON(t, "PATCH", urlStr, api.EditIssueOption{
Body: new("updated body with correct version"),
ContentVersion: new(before.ContentVersion),