Refactor integration test DecodeJSON calls to use generic return value (#37432)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -37,8 +37,7 @@ func TestAPIReposGitNotes(t *testing.T) {
|
||||
AddTokenAuth(token)
|
||||
resp := MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
var apiData api.Note
|
||||
DecodeJSON(t, resp, &apiData)
|
||||
apiData := DecodeJSON(t, resp, &api.Note{})
|
||||
assert.Equal(t, "This is a test note\n", apiData.Message)
|
||||
assert.NotEmpty(t, apiData.Commit.Files)
|
||||
assert.NotNil(t, apiData.Commit.RepoCommit.Verification)
|
||||
|
||||
Reference in New Issue
Block a user